President Bush demanded Wednesday that the Senate renew the Patriot Act even as he received a letter from senators requesting a three-month extension of the current law.

But several lawmakers said they're hopeful that secret talks could yield a compromise and allow the measure to pass before it expires at year's end. A deal preserving the expiring portions of the terror-fighting USA Patriot Act is in the works, FOX News confirmed.

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. He said that the deal would allow the Senate to pass the current legislation "on my commitment to take up issues" that concern opponents.

"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 who told FOX News that "things are moving" on Capitol Hill said "the department would be pleased" if the Senate reached the rumored deal on the Patriot Act so that the renewal could be passed and the disputed elements would be revisited next year.

Earlier in the day, Bush declared "obstruction" on passage of the deal, which has already been through House-Senate negotiations and was passed by the House last weekend, 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 52 Democrats and Republicans, who now prefer extending the act for 90 days while additional changes to the conference report are negotiated. That's 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.

The letter followed a vote last week in which four Republicans joined Senate Democrats in blocking a final vote on extending the key provisions, which are set to expire at year's end. 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.

They also 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. "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, ranking Democrat on the Senate Judiciary Committee and one of the Democratic negotiators who refused to sign the conference report.

Aides added that Bush won't accept a temporary extension, but Leahy said Bush has to know when to hold them and when to fold them, and it's time for the president to fold.

Officials said that if the deal is struck, the eight moderate Republicans who agreed to the filibuster are expected to go along with the deal, leaving Democrats having to argue alone, and putting them in a situation in which they could be accused of risking U.S. security.

FOX News' Carl Cameron and Wendell Goler and The Associated Press contributed to this report.