WASHINGTON (AP) _ Two days after letting a disputed post-9/11 surveillance program go dark, the Senate sped toward passage Tuesday of legislation to revive but also reshape it. GOP leaders mounted a last-ditch effort to soften some of the changes.

Republicans in the House, meanwhile, warned their Senate counterparts to back off on proposed amendments, suggesting they could kill support for the bill in the House, which passed it by a wide margin last month. But GOP senators pushed back.

“The House’s bill is not holy writ,” said Sen. John Cornyn of Texas, the No. 2 Senate Republican.

The Senate voted 83-14 during a morning session to move forward with debate on the House’s USA Freedom Act, continuing an about-face after Majority Leader Mitch McConnell and other Republicans had declared it unacceptable just days earlier.

Congressional procedures shared the stage. If any amendments were approved, the legislation would have to go back to the House for further debate, and the counterterror programs would remain lapsed. If the House’s version were approved without changes, it could go straight to President Barack Obama for his signature.

At the White House, press secretary Josh Earnest pushed for the bill to pass unchanged.

“If they will pass that piece of legislation, then the president will quickly sign it into law and give our law enforcement professionals, once again, tools that they say are critical to their efforts to keep the country safe,” he said.

The Senate began a series of votes Tuesday afternoon with unusual suspense over the outcome. But the first amendment to come to a vote, which would have limited the powers of a new committee created by the House bill to advise the Foreign Intelligence Surveillance Court, failed by a wide margin, 56-42.

The House legislation would remakes the most controversial aspect of the USA Patriot Act _ the once-secret bulk collection program that allows the National Security Agency to sweep up Americans’ phone records and comb through them for ties to international terrorists.

The legislation would continue other post-9/11 surveillance provisions that also lapsed Sunday night, and which are considered more effective than the phone-data collection program. These include the FBI’s authority to gather business records in terrorism and espionage investigations and to more easily eavesdrop on suspects who are discarding cellphones to avoid surveillance.

Two years ago, NSA contractor Edward Snowden revealed details of the NSA program. The House bill would end the federal phone-records operation, leaving the records with phone companies and giving the government the ability to seek access with a warrant.

McConnell and other Senate leaders argue this change compromises the government’s anti-terror capabilities _ though it’s supported by both Obama and GOP House Speaker John Boehner.

Senate Republican leaders were forced to go along with the change anyway after libertarian-minded senators led by presidential candidate Rand Paul, R-Ky., united repeatedly against extending current law unchanged. By the time McConnell capitulated Sunday evening, just hours were left before the deadline for portions of the law to expire, and Paul was able to hold off a final vote until Tuesday _ with the program lapsed.

The expiration, although brief, provoked an outcry from government officials who contended that Senate inaction put the country at risk, while civil liberties groups cheered the outcome. Paul succeeded in setting himself apart from the GOP presidential pack, while for McConnell, the whole episode raised bitter questions about his leadership six months after Republicans retook control of the Senate.

Unwilling to completely embrace a House bill he abhors, McConnell pushed some final changes Tuesday he characterized as “discrete and sensible improvements.”

These included lengthening the phase-out period of the bulk records program from six months to a year, requiring the director of national intelligence to certify that the NSA can effectively search records held by the phone companies and making phone companies notify the government if they change their policy on how long they hold the records.

Most controversially, McConnell would weaken the power of a new panel of outside experts created to advise the Foreign Intelligence Surveillance Court.

If McConnell viewed the change as limited and sensible, House Republicans vehemently disagreed.

The amendments contemplated by the Senate “would bring real challenges” in the House, said Majority Leader Kevin McCarthy, R-Calif.

A senior Republican on the House Judiciary Committee, Jim Sensenbrenner of Wisconsin, warned during a private GOP meeting that the changes amounted to a “poison pill” for the legislation.

In part because of those concerns from the House, Senate Democrats were preparing to vote against McConnell’s amendments, and a handful of Republicans also declared their opposition.

“If you amend this bill it kills the bill. The irony of it is it puts all the hawks with Rand,” said Sen. Dean Heller, R-Nev.

The failure of the amendments would be an embarrassment for McConnell, whose handling of the issue has led to questions about why he didn’t come up with a workable plan before deadline pressure allowed presidential politics to prevail and forced a shutdown that, if not dangerous, was at least messy and unwieldy.