WASHINGTON — The U.S. Senate approved President Barack Obama’s plan for training and arming moderate Syrian rebels to battle Islamic State militants on Thursday, a major part of his military campaign to “degrade and destroy” the radical group.

The Senate voted 78-22, in a rare bipartisan show of support for one of Obama’s high-profile initiatives.

Ten Senate Democrats and 12 Republicans voted no. Some objected to including a “war vote” in a spending bill.

With the House of Representatives approving the legislation on Wednesday, the measure goes to Obama to sign into law.

Others worried that getting involved with the rebels would lead to broader involvement in Iraq or Syria’s civil war or that any arms given to them might fall into the wrong hands and end up being used against U.S. forces or their allies.

The measure was written as an amendment to a spending bill that would keep the U.S. government operating on Oct. 1, the start of a new fiscal year.

The legislation is likely just the start of a debate over what longer-term role the U.S. military should have in battling the Sunni Islamist militants who have killed thousands of people in Iraq and Syria, declared war on the West and are held responsible for beheading two American journalists in recent weeks.

“Today, I voted to keep the government open and prevent the disruption of federal services so critical to the lives of many Americans,” said U.S. Sen. Susan Collins, R-Maine, a senior member of the Senate Appropriations Committee and a member of the Senate Intelligence Committee. “The American people do not want dysfunction in Washington to lead to another harmful government shutdown like the one we experienced last year, and allowing that to happen would only further jeopardize our still struggling economy.

“I am disappointed, however, that Senate leaders did not allow a full debate or hold a vote on an authorization for the use of military force or the president’s overall strategy to confront the terrorist group known as the Islamic State in Iraq and the Levant, or ISIL,” she said.

“This week, I wrote to Secretary of State John Kerry to express my concerns about the scope of the Administration’s proposal, the process for vetting members of the opposition, and what the Administration is doing to detect and disrupt plots from other terrorist groups intent on harming Americans,” Collins said. “My support for the president’s overall strategy against ISIL will depend upon the answers I receive from Secretary Kerry and the president’s ability to prove that the administration can build an effective coalition of allies against these terrorists.”

U.S. Sen. Angus King, I-Maine, a member of the Senate Armed Services and Intelligence Committees, also voted in favor of the resolution that authorizes the Department of Defense to train and equip vetted elements of the Syrian opposition in the fight against Islamic State. King explained his vote in a floor speech delivered earlier in the day, in which he also outlined his broader thoughts on the administration’s strategy.

“One of the most fundamental purposes listed in the preamble is to provide for the common defense and ensure domestic tranquility. This is why we’re having this debate today,” King said. “This arming and equipping provision is not a panacea. It is not going to end the war. It is not going to be easy. It is no sure thing. …[I]t is the least worst option. It is one that we must undertake. It has to be part of the solution because to root out ISIL, whose headquarters is in Syria — not Iraq, there are going to have to be troops. …Where are those troops going to come from? Not from the United States. They have to come from within the Syrian opposition itself.”

The rebels have been fighting a three-year-long civil war seeking to oust Syrian President Bashar al-Assad, who has held onto power despite the rise of the Islamic State group and a long covert U.S. effort to back the moderate fighters.

The amendment to arm and train the rebels passed the House on a vote of 273-156, with support — and opposition — divided between Democratic and Republican lawmakers. If Obama signs it into law as expected, the authority to train and arm the rebels would expire on Dec. 11.

Obama sought the authorization to have some congressional buy-in for his plan to stop the violent Islamic State militants, whose takeover of large parts of Iraq and Syria is seen as a threat to U.S. national security.