Late Wednesday evening, senators struck a deal that will fully reauthorize the Patriot Act in its current form for six months and give lawmakers the chance to revisit controversial portions of the act that have been subject to extensive opposition.
Soon after the deal was announced, the Senate passed the extension.
The agreement came after a full day of negotiation among President Bush and Senate Republican leaders who support renewal and Democrats and moderate GOPers who oppose the act in its negotiated form.
According to the deal reached late Wednesday, the 16 expiring provisions of the Patriot Act would be renewed for six months. That will give opponents the chance to take up the civil liberties issues that forced a filibuster on the bill last week.
Republican Sens. Chuck Hagel of Nebraska, Larry Craig of Idaho, John Sununu of New Hampshire and Lisa Murkowksi of Alaska helped block a final vote on a compromise bill offered by House and Senate negotiators last week. In the last days, four more Republican moderates agreed that they wanted to look at a few of the provisions that most irk civil liberties groups.
"For a lot of reasons, it made the most sense, given that there are significant differences that remain," said Sununu.
"We now have six months to mend the Patriot Act. Democrats will use this time to make sure the Patriot Act gives the government the tools it needs to fight the terrorists while also protecting the privacy of innocent Americans," Senate Minority Leader Harry Reid said in a written statement.
The House has already approved the final version negotiated by House and Senate conferees last week. Members may need to return to vote on the shortened expiration date. The Patriot Act was set to expire at the end of the month.
Early in the day, several lawmakers said they were hopeful that secret talks could yield a compromise and allow the measure to pass before it expires.
Chances of a deal "are brighter in the last half hour than they've been for six days," said Sen. Arlen Specter, R-Pa., chairman of the Senate Judiciary Committee and a supporter of the legislation in mid-afternoon. At that time, the deal being negotiated was to let the Senate pass the current legislation for four years on the agreement that the three provisions causing the most consternation could be re-evaluated and face a vote by May 31, 2006.
"We'd have hearings early next year and consider the amendments, no commitment as to passage, but give consideration to that so we don't have the Patriot Act lapse, since it's important to America," Specter said.
A senior Justice Department official speaking before the deal was reached told FOX News that "things are moving" on Capitol Hill said "the department would be pleased" if the Senate reached an agreement on Specter's suggestion.
Early Wednesday, President Bush demanded that the Senate renew the Patriot Act for the full four-year extension even as he received a letter early Wednesday from senators requesting a three-month extension of the current law.
Bush declared "obstruction" on passage of the act is "inexcusable" and "will endanger America."
He warned that the terrorist threat won't expire even if the Patriot Act does, and he said his administration has been careful not to use the act in a way that abuses civil liberties.
"It has been an effective tool; it has worked. And the same as we protected the American people using the Patriot Act, we've also protected their civil liberties. There is extensive oversight on this very important program," he said on his way to Bethesda Naval Medical Center in Maryland, where he visited with military medical caregivers.
In a separate event, Homeland Security Secretary Michael Chertoff and Attorney General Alberto Gonzales argued that if the Senate refuses to renew the law, they will have made the United States a more dangerous place.
If the act expires, "we put some very important weapons down on the ground in the War on Terror," Chertoff said. "We will not be as safe. That's what is at stake."
Gonzales said the act has been "extremely effective" in helping law enforcement sniff out terrorist plots and stop them before they happen, and the new legislation "contains 30 additional safeguards for civil liberties" to appease civil libertarians.
But the president faced a dilemma after receiving a letter signed by 44 Democrats and eight Republicans, who said they preferred extending the act for 90 days while additional changes to the conference report are negotiated. That is a majority of the body and enough to block any future votes to renew the law.
Click here to read the letter from 52 senators to Bush on extending the current Patriot Act law.
Opponents to the extension contend that more civil liberties protections are needed in the bill, which Congress passed after the Sept. 11, 2001, terror attacks to give law enforcement additional powers.
Lawmakers say they want to adjust two or three provisions of the 16 main components in the act. They include restricting the circumstances under which the government can search the records, homes or businesses of people with suspected ties to terrorism, without getting a court's authorization.
Sununu told FOX News that he wants to see changes to the "gag orders" with regard to national security letters and on library and business records searches.
Craig aides said the senator wants to see stricter constraints on so-called "sneak-and-peek" searches.
Opponents of the provisions also say they want to give people suspected of plotting terrorist acts more access to the courts. Democratic Sen. Chuck Schumer of New York said Bush doesn't have many options.
"The choice is very simple; it is a three-month extension or some extension of a relatively short time," Schumer said during the afternoon. "We can't change that we had one vote already. And the question is whether we move forward and the country suffers."
"Our goal is to mend it or extend it, not end it," said Sen. Patrick Leahy of Vermont, the ranking Democrat on the Senate Judiciary Committee and one of the Democratic negotiators who refused to sign the conference report.
FOX News' Carl Cameron, Wendell Goler and Trish Turner and The Associated Press contributed to this report.