Key US senators have agreed to back a controversial anti-terror law which the Bush administration has spent months struggling to have renewed.
Mr Bush spoke of a foiled terror plot shortly before the deal was done
The Patriot Act gave the government new powers to investigate terror suspects after the 11 September 2001 attacks.
Civil libertarians in both parties have objected to some measures, which were due to expire at the end of 2005 and had been only temporarily extended.
The White House has now agreed to changes making renewal almost certain.
President Bush on Thursday outlined details of what he called a terrorist plot to attack Los Angeles, which he said had been derailed by international law enforcement in 2002.
Chance to challenge
The deal on the Patriot Act reportedly includes limiting the government's power to demand that libraries hand over information about what books people have borrowed.
It also alters the conditions of the National Security Letter, a type of order for a person to appear in secret court.
The Patriot Act had required people who received a National Security Letter to tell the FBI the identity of their lawyers - a condition which will be dropped.
The deal also gives recipients of a National Security Letter the right to challenge the automatic "gag order" which prevents them from saying they have received one.
They will only be able to challenge the gag a year after receiving the subpoena, a compromise that Sen John Sununu said was an improvement over the original law.
"You now have the process to challenge the gag order. That didn't exist before," the Washington Post quoted the New Hampshire Republican as saying.
Mr Sununu was one of a small number of Republicans who had joined with key Democrats in the fight against making 16 controversial provisions of the Patriot Act permanent.
They had been due to expire at the end of 2005 but got a temporary extension to give lawmakers more time to debate them.
The changes have won over some key Democrats, including Diane Feinstein and Richard Durbin, the number-two Democratic leader in the Senate.
Senate minority leader Harry Reid also signalled support, saying the deal "appeared to be a step in the right direction".
Some Democrats continue to oppose the amended legislation, such as Russell Feingold of Wisconsin.
"I am gravely disappointed in this so-called deal," he said.
He said it did not fix what he described as major problems.
"We've come too far and fought too hard to agree to reauthorise the Patriot Act without fixing those problems."
When the act does finally get voted through Congress, President Bush will be mightily relieved, the BBC's Adam Brookes in Washington says.
No date has been set for a Senate vote on the issue.