The $1.1 trillion spending bill included a provision that allows federal abortion coverage for Peace Corps volunteers, which has been barred since 1979. (Alex Wong/Getty Images)

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-wide 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 Lautenberg (D-N.J.) proposed legislation to the same effect.

Sen. Jeanne Shaheen (D-N.H.) and Rep. Nita 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 agreement.

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.

MORE: Women’s health groups want Peace Corps volunteers to have insurance coverage for abortions 

Abortion-rights groups 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 Peace Corps offered similar praise for the legislation on Wednesday.

“The health, safety and security of volunteers are our absolute highest priorities, and this important step forward furthers our work to enhance volunteer support as we build a better, stronger Peace Corps,” agency director Carrie Hessler-Radelet said in a statement.

Ironically, the Peace Corps abortion ban came about through a rider attached to the Peace Corps’ annual appropriations bill in 1979. That means the restriction started and ended with language that lawmakers inserted into funding bills.