WASHINGTON — American ground troops may be needed to battle Islamic State forces in the Middle East if President Barack Obama’s current strategy fails, the nation’s top military officer said Tuesday as Congress plunged into an election-year debate of Obama’s plan to expand airstrikes and train Syrian rebels.

“To be clear, if we reach the point where I believe our advisers should accompany Iraqi troops on attacks against specific ISIL targets, I will recommend that to the president,” Army Gen. Martin Dempsey declared in testimony to the Senate Armed Services Committee, referring to the militants by an alternative name.

Pressed later by Sen. Carl Levin, D-Mich., the panel’s chairman, the four-star general said if Obama’s current approach isn’t enough to prevail, he might “go back to the president and make a recommendation that may include the use of ground forces.” Obama has maintained repeatedly that American forces will not have a renewed ground combat mission in Iraq in this new phase of a long war against terrorists.

Tuesday’s remarks by the chairman of the Joint Chiefs of Staff drew a prompt, polite rebuttal from the White House. Obama “will not deploy ground troops in a combat role into Iraq or Syria,” said spokesman Josh Earnest.

Dempsey’s testimony underscored the dilemma confronting many lawmakers as the House moves through its own debate on authorizing the Pentagon to implement the policy Obama announced last week. In Iraq on Tuesday, the U.S. carried out an airstrike near Baghdad for the first time since launching an aerial campaign in early August, and French warplanes flying from the United Arab Emirates began reconnaissance missions over the country.

Democrats in Washington spoke of a fear that the United State might inevitably become dragged into yet another ground war on the heels of Afghanistan and Iraq. “We must ... ask ourselves if we can truly ‘vet’ these rebel groups beyond their known affiliations, and ensure we are not arming the next extremist threat to the region and the world,” said Rep. Pete Visclosky, D-Ind.

Republicans said they worried that Obama was responding tepidly to the current threat by terrorists who have overrun large sections of Iraq and Syria and beheaded two American journalists. “If it’s important enough to fight, it’s important enough to win,” said Rep. Jack Kingston, R-Ga., one of the first lawmakers to address the subject in several hours of scheduled debate.

A vote was expected in the House on Wednesday, and in the Senate within days. In the Senate, Republican leader Mitch McConnell announced he would support the measure and Democratic leader Harry Reid predicted bipartisan approval. The timetable was remarkably rapid by congressional standards, the result of a strong desire by lawmakers in both parties to adjourn quickly and return home to campaign for re-election.

Only seven weeks before voters go to the polls, most Republicans had little stomach to oppose Obama on a matter of national security, particularly when polls suggest he has the support of large segments of the public. As a result, the likelihood was that Congress would swing behind his request, and then return for a fuller debate of his war strategy in a postelection session of Congress.

“I think there’s a lot more that we need to be doing, but there’s no reason for us not to do what the president asked us to do,” said Speaker John Boehner, the leader of House Republicans.

The legislation also drew support from Sen. Levin, an influential voice among Democrats on military matters. He is retiring, but fellow Democrat Jeanne Shaheen of New Hampshire, who is in a difficult re-election race, said she intended to back Obama’s request. Even so, she added it “would be a mistake” for Congress not to debate the issue in depth in the future.

Dempsey and Defense Secretary Chuck Hagel fielded questions as Obama met in the Oval Office with retired Marine Gen. John Allen, who is coordinating international efforts to combat the Islamic State militants.

Sen. John McCain, R-Ariz., seemed incredulous, saying the United States evidently intended to train Syrian rebels without anticipating they would be attacked from the air by forces loyal to President Bashar Assad, whom they are sworn to drive from power.

He asked how U.S. forces would respond in the event Assad’s air force bombed the U.S.-trained forces. “We will help them, and we will support them,” Hagel eventually said.

Sen. Jim Inhofe, R-Okla., posed a different hypothetical question, asking Dempsey if U.S. forces will be prepared to mount search and rescue operations and “be prepared to put boots on the ground” if American pilots are shot down.

“Yes and yes,” responded the general.

There was skepticism, as well, that the United States would be able to properly identify as many as 5,000 Syrian rebels who could be trusted to carry out Obama’s mission in a region where religious and tribal loyalties frequently collide.

Hagel said the U.S. will monitor them closely to ensure that weapons don’t fall into the wrong hands. “We have come a long way” in our ability to vet the moderate opposition, and the U.S. has learned a lot as it has funneled non-lethal aid to the rebels, Dempsey said.

Dempsey said it would take three to five months to establish the training program, working with moderate Syrians who have been driven from their homes by Islamic militants. An estimated two-thirds of the approximately 30,000 extremists are in Syria.

————

AP White House Correspondent Julie Pace and reporters Lolita C. Baldor, Erica Werner, Alan Fram, Andrew Taylor and Bradley Klapper contributed to this report.