WASHINGTON (AP) — Republican legislation letting states deny federal family planning money to Planned Parenthood and other abortion providers advanced toward Senate passage Thursday, rescued by an ailing GOP senator who returned to the Capitol after back surgery and a tie-breaking vote by Vice President Mike Pence.

Republican leaders kept a procedural vote open for over an hour after two GOP senators, Alaska's Lisa Murkowski and Maine's Susan Collins, joined Democrats trying to block the measure. Pence then journeyed to the Capitol to break a 50-50 tie and cast the deciding vote in Congress' latest clash that mixed abortion, women's health and states' rights.

Senate approval was planned later Thursday and would send the measure to President Donald Trump, who was expected to sign it. The House voted its consent last month.

Passage would give Republicans and anti-abortion groups a needed victory just six days after the party's highly touted health care overhaul disintegrated in the House due to GOP divisions. Besides erasing much of former President Barack Obama's 2010 health care law, the abandoned House bill would have blocked federal funds for Planned Parenthood for a year.

The Senate measure would roll back a regulation Obama issued shortly before leaving office. It bars state and local governments from denying federal family planning funds to organizations unless they are unable to provide those services. Some states have passed laws preventing abortion providers from receiving the funds.

There is already a ban on using federal funds for abortion except for rare instances.

Democrats assailed the legislation as an attack on women, two months after Trump's inauguration prompted a women's march on Washington that mushroomed into anti-Trump demonstrations around the nation.

"While Trumpcare was dealt a significant blow last week, it is clear that the terrible ideas that underpin it live on with Republicans in Congress," said Sen. Patty Murray, D-Wash., using a nickname for the failed House health care bill. Murray, among a stream of Democratic women senators who spoke, called the Senate measure "shameful" and "dangerous."

Republicans said the measure would give states more freedom to decide how to spend family planning funds. States would be free to divert money now going to groups that provide abortion to other organizations that don't, like community health centers.

With Republicans holding 52-48 control of the Senate, the Collins and Murkowski defections could have derailed the bill because Sen. Johnny Isakson, R-Ga., has been absent since Feb. 20, when he had spinal surgery.

He had a second operation March 15 and has been recuperating in Georgia under doctor's orders. But he got permission to return to Washington for one day, his office said, and he did so using a walker.

"We didn't know at the time what it would be but it turned out to be the vice president's tie-breaker," Isakson told reporters after the procedural vote.

The federal family planning program was created 1970 and in 2015 served 4 million clients at nearly 4,000 clinics. Most of the money is for providing services like contraceptives, family planning counseling, breast and cervical cancer screening and sexually transmitted disease prevention. It has a $286 million federal budget this year.

Most recipients are women, and two-thirds have incomes at or below the federal poverty level, around $12,000 for an individual. Six in 10 say the program's services are their only or most frequent source of health care.

"Mike Pence went from yesterday's forum on empowering women to today leading a group of male politicians in a vote to take away access to birth control and cancer screenings," she said.

The Congressional Review Act lets lawmakers undo regulations enacted in the last months of the Obama administration with a majority vote. Congress has already used the law to eliminate Obama regulations that strengthened protections for streams near coal-mining operations and prevented some people with mental disorders from purchasing guns.

Under the Constitution, the vice president casts tie breaking votes. Pence broke his first tie on the nomination of Education Secretary Betsy DeVos.

The Associated Press is an American multinational nonprofit news agency headquartered in New York City. The AP is owned by its contributing newspapers, radio, and television stations in the United States, all of which contribute stories to the AP and use material written by its staff journalists.

Republicans held onto a conservative House seat in Montana despite a last-minute assault charge against their candidate. Democrats say the GOP had to spend millions on what should have been an easy win.