WASHINGTON – 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 expires.

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.

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