The US Congress has given its final approval to the renewal of the Patriot Act, providing a boost to President Bush's fight in the "war on terror".
The act is one of the president's central planks in US anti-terror law
Concerns over civil liberties had prevented the act from being passed for several months.
The White House agreed to revise the bill after senators expressed unease over the level of power afforded to federal agents.
The act was first introduced just weeks after the 11 September attacks.
The bill was passed by the House of Representatives on Tuesday by 280 votes to 138.
It was given approval by the Senate last week.
"This much-needed legislation gives law enforcement the tools necessary to stay on the offensive in our fight against terrorism," House Republican Speaker Dennis Hastert said.
Months of wrangling had forced a number of compromises with the government agreeing to some curbs on information gathering.
Sixteen provisions of the act were due to expire on Friday.
The bill to renew the law would make 14 of them permanent and extend two others by four years.
One of these allows federal agents to obtain "tangible items" such as business records for foreign intelligence and international terrorism investigations.
One of the compromises limits the government's power to demand that libraries hand over information about what books people have borrowed unless it receives a judge's consent.
Despite the vote, the act still has its opponents on both sides of the House.
"I rise in strong opposition to this legislation because it offers only a superficial reform that will have little if any impact on safeguarding our civil liberties," said Democrat Dennis Kucinich.
President Bush is expected to sign the bill into law before the provisions expire on Friday.