President Bush has signed into law a renewal of the Patriot Act - only hours before a number of its key provisions were due to expire.
Congressmen surrounded Mr Bush as he signed the law
The US Congress approved the measure - seen as a key part of the government's fight against terrorism - on Tuesday.
Concerns over civil liberties had prevented the act from being passed for several months.
The White House agreed to revise it after expressions of unease at levels 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 and the Senate last week.
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 makes 14 of them permanent and extends 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.