WASHINGTON (AP) — A bill to rescind the COVID-19 vaccine mandate for members of the U.S. military and provide nearly $858 billion for national defense passed the House on Thursday as lawmakers scratch off one of the final items on their yearly to-do list.

The House passed the bill by a vote of 350-80. It now goes to the Senate, where it is expected to pass easily, then to the president to be signed into law. To win bipartisan support for the bill, Democrats agreed to Republican demands to scrap the requirement for service members to get a COVID-19 vaccination. The bill directs Defense Secretary Lloyd Austin to rescind his August 2021 memorandum imposing the mandate. Only days earlier he voiced support for keeping the mandate in effect.

Republicans said the mandate hurt recruiting and retention efforts. Rep. Mike Rogers, top Republican on the House Armed Services Committee, said he intends in the next Congress to examine who was adversely affected by the mandate, “so we can try to revisit that and make them whole to the extent desirable."

More than 8,000 active-duty service members were discharged for failure to obey a lawful order when they refused the vaccine.

“Some of the folks who have moved on are not going to want to come back,” said Rogers, who will become chairman of the Armed Services Committee in the next Congress.

Military leaders have argued that troops for decades have been required to get as many as 17 vaccines in order to maintain the health of the force, particularly those deploying overseas. Recruits arriving at the military academies or at basic training get a regimen of shots on their first day — such as measles, mumps and rubella — if they aren’t already vaccinated. And they routinely get flu shots in the fall.

While the rescission of the COVID-19 vaccine mandate has generated much attention, it takes up one paragraph of what is a 4,408-page bill.

The defense policy legislation is critical in shaping the military's future. It sets the maximum number of service members authorized to be in the various branches of the military. It authorizes money for specific major weapons programs and it establishes pay and benefits. This year's bill authorizes money to support a $4.6% pay raise for military members and the Defense Department's civilian workers.

The bill also authorizes $800 million in additional security assistance for Ukraine and calls for a report on whether any gaps exist in the oversight of aid to that country. That addresses the concerns of some Republicans who have been calling for a more detailed accounting of how the money has been spent.

The legislation received broad support from House members of both political parties. Opposition came from 45 Democrats and 35 Republicans.

Lawmakers failed in some instances to attach their priorities to the bill, such as an effort to prevent federal banking regulators from imposing penalties on banks that offer services to cannabis-related businesses. Also left out was legislation from Sen. Joe Manchin, D-W.V.., to speed permits for natural gas pipelines and other energy projects, including a pipeline project in his home state and Virginia.