Updated

Squeezed against a deadline, the Senate late Wednesday moved past a standoff over a four-year extension of the anti-terror Patriot Act before part of it expire.

An agreement to hold a test vote early Thursday was the first progress all week toward resolving an impasse between Senate Majority Leader Harry Reid and tea party favorite Rand Paul, R-Ky., before three provisions of the act expire at midnight Thursday. Just before he closed the Senate on Wednesday night, Reid said there likely would be votes on amendments to the extension.

That could go a long way toward meeting Paul's demand that Reid make good on a promise earlier this year to hold a full debate on proposed changes to the post-9/11 law, which empowers the government to find terrorists on American soil. Paul and other civil libertarians of both parties say the Patriot Act should be reconsidered or repealed outright because it risks infringing free speech and guarantees against unreasonable searches and seizures.

The legislation would extend three expiring provisions until June 1, 2015.

The provisions at issue allow the government to use roving wiretaps on multiple electronic devices and across multiple carriers and get court-approved access to business records relevant to terrorist investigations. The third, a "lone wolf" provision that was part of a 2004 law, permits secret intelligence surveillance of non-U.S. individuals without having to show a connection between the target and a specific terrorist group.

Paul did not respond to a request for comment late Wednesday. But officials of both parties close to the negotiations said it was now likely that the bill would to pass the Senate and the House on Thursday and be flown to Europe for President Barack Obama's signature by the midnight deadline.

The prospect of the law's expiration wasn't quite the nail-biter its supporters suggested.

If the act expired, the government would be unable to get court warrants for new investigations. But investigators still could get court authority for foreign intelligence probes that were already under way before the provisions expired.

The government seeks warrants for business records less than 40 times a year, on average, Todd Hinnen, acting assistant attorney general for the Justice Department's national security division, said in congressional testimony in March. Between 2001 and 2010, the government has sought roving wiretap authority in about 20 cases a year on average, Hinnen added.

Hinnen said the government had not used the lone wolf authority.

But the White House and the intelligence community prodded Congress to act quickly, saying any lapse in the law would mean lesser capability to find and stop terrorist threats. Intelligence Committee Chairwoman Dianne Feinstein, D-Calif., earlier this week said the terrorist threat survived the death of Osama bin Laden earlier this month.

Paul, a tea party favorite, had a dozen proposed amendments to the Patriot Act. He and Reid whittled the list down to four. One would have excluded some gun records from Patriot Act investigations. An exasperated Reid used procedural maneuvers to cut off debate, but Paul refused to allow the time for a final vote to be moved up.

On the Senate floor Wednesday, Reid accused Paul of holding up the debate because of one gun amendment and risking "a retaliatory terrorist strike against the homeland."

"If he thinks it's going to be a badge of courage on his side to have held this out, he's made a mistake," Reid, D-Nev., announced.

Paul objected to the "scurrilous accusation. I've been accused of wanting to allow terrorists to have weapons to attack America."

"Do we want a land, a government without so much restraint that at any time they can come into your house?" he said. "We were very worried about that. That's why our country was founded on principles such as the Fourth Amendment."

Later, Reid approached Paul on the Senate floor. The two talked briefly, grinned, and the majority leader patted Paul on the shoulder.

___

Associated Press writer Pete Yost contributed to this report.