Sen. Rand Paul (R-KY) listens during a news conference with other Senate Republicans to announce a proposed balanced budget amendment to the Constitution in the U.S. Capitol on March 31, 2011 in Washington, DC. (Brendan Hoffman/GETTY IMAGES)

Racing against the clock, Congress approved a four-year extension Thursday to key provisions of the USA Patriot Act that will allow federal investigators to continue to use aggressive surveillance tactics in connection with suspected terrorists.

Overcoming objections from a bipartisan clutch of libertarian-minded lawmakers, the legislation passed the Senate, 72 to 23, and the House, 250 to 153.

The provisions were due to expire at midnight Thursday without an extension. President Obama is attending a summit in France, but the bill was signed by autopen with his authorization moments before the deadline, the White House said.

“I think it is an important tool for us to continue dealing with an ongoing terrorist threat,” Obama said Friday, after a meeting with French President Nicolas Sarkozy.

Some supporters had warned that any interruption in the law could have dire consequences for national security, while opponents demanded more time to debate the need for such provisions almost 10 years after the attacks of Sept. 11, 2001.

“We shouldn’t be fearful of freedom, we shouldn’t be fearful of individual liberty,” freshman Sen. Rand Paul (Ky.), the legislation’s lead opponent, said Thursday.

Three other Senate Republicans joined Paul and 19 Democrats in voting against the extension. Voting in favor were 31 Democrats and 41 Republicans.

In the House, 196 Republicans and 54 Democrats voted yes, and 31 Republicans and 122 Democrats voted no. Twenty-nine members did not vote.

Under the provisions extended into 2015, investigators can obtain court orders to follow suspected terrorists with “roving wiretaps” that cover multiple phone numbers and carriers. They also will extend provisions that allow investigators to seize customer records for suspected terrorists.

The vote on the bill came less than a month after U.S. special forces killed Osama bin Laden in Pakistan, reassuring support on Capitol Hill in general for the anti-terrorism tools put in place after al-Qaeda’s attacks in 2001. Administration officials have warned of possible retaliation for the bin Laden killing, a fact that supporters of the Patriot Act cited Thursday.

“The raid that killed Osama bin Laden also yielded an enormous amount of new information that has spurred dozens of investigations yielding new leads every day. Without the Patriot Act, investigators would not have the tools they need to follow these new leads and disrupt terrorist plots, needlessly putting our national security at risk,” said Senate Majority Leader Harry M. Reid (D-Nev.).

The Senate debate created unusual coalitions on the far left and the far right. Paul, considered one of the most conservative senators, was joined in his opposition by Sen. Al Franken (D-Minn.), among the most liberal.

Paul fought for several days to offer a string of amendments to the legislation, including one that would exempt some gun-record searches from being accessible to federal investigators. That proposal was deemed too much for even the National Rifle Association, as just 10 senators supported it and 85 voted against it.