WASHINGTON - Congress and President Obama this week halted a 35-year ban on federal abortion assistance for Peace Corps volunteers with their approval of a government spending bill.

The legislation extends abortion coverage to Peace Corps volunteers in cases of rape, incest, and life endangerment, giving them the same assistance the government provides for federal prisoners, female troops, women on Medicaid, and much of the federal workforce, including paid Peace Corps employees.

The bill's passage quietly ended a battle over abortion coverage that started more than a year ago, when the late Sen. Frank R. Lautenberg (D., N.J.) proposed legislation to the same effect.

Sen. Jeanne Shaheen (D., N.H.) and Rep. Nita M. Lowey (D., N.Y.) carried the effort forward after Lautenberg's death, reintroducing roughly the same measure in May.

The two lawmakers used their clout as members of the Senate and House Appropriations Committees to insert the proposal into the $1.1 trillion spending bill, adding it to a long list of non-budget provisions in the deal.

Shaheen explained her motivation in a statement on Wednesday. "Peace Corps service members deserve the same basic health-care benefits provided to other women on federal health-care plans," she said.

Antiabortion groups have opposed efforts to lift the ban. Americans United for Life has suggested that the Obama administration was trying to expand abortion services and should instead focus on doing a better job of protecting Peace Corps volunteers.

Abortion-rights advocates were quick to cheer the legislation's passage in the House last week, even though the measure still had to clear the Senate.

"We applaud Congress for extending equitable abortion coverage to female Peace Corps volunteers," Planned Parenthood Action Fund President Cecile Richards said in a statement. "These volunteers put their safety on the line through their invaluable service and deserve the same protections we provide to other women throughout the federal government."

The abortion ban came about through a rider attached to the Peace Corps' annual appropriations bill in 1979.