Last spring, Tom Ridge was so eager to start earning a private-sector salary after decades in government, and so frustrated by perceptions of his bureaucratic impotence as homeland security adviser to President Bush, that he came close to quitting and returning to Pennsylvania.

This week, as nearly 180,000 employees join the new Department of Homeland Security that he has directed since Jan. 24, Ridge has become one of the four or five most powerful figures in the Bush administration, a man in charge of the president's most crucial domestic initiative.

Bush has staked considerable credibility and some of his political fortune on his old friend's success in protecting Americans from terrorist attacks. The president has given Ridge enormous clout that is comparable to the sway commanded by the heads of the Justice, Defense and State departments, administration officials and government experts said.

"The president has placed authority with Ridge over the central agenda, the most important issue facing this presidency," said David M. Abshire, president of the private Center for the Study of the Presidency and a leading expert on the executive branch. "Ridge's success is a key to President Bush's success, and Bush has said, 'This is my guy.' " While Ridge was homeland security adviser, before the creation of the new department, many in Washington questioned his stature in the administration. But during his 15 months in that role, one of the tasks Ridge accomplished was to quietly devise a blueprint for the department he will now lead.

Insiders cite as an example of Ridge's behind-the-scenes clout an episode in late 2001, when Ridge proposed merging border agencies such as the Immigration and Naturalization Service and Customs Service. Top Justice, Treasury and Transportation department officials bitterly protested their possible loss of turf and derided the idea as dead on arrival. But, months later, the recommendation was a centerpiece of the president's ambitious plan to create the new department.

"President Bush created this enormously powerful agency with Tom Ridge in mind, overseeing an area that is extremely important to the president," said I. Lewis "Scooter" Libby, Vice President Cheney's chief of staff. "That in itself is a very powerful statement of the president's confidence in Tom Ridge."

Ridge declined to comment for this article.

Ridge meets with Bush at the White House once a week for an hour. He is the only Cabinet member besides Defense Secretary Donald H. Rumsfeld and Secretary of State Colin L. Powell who has such access.

In addition, every weekday at 8 a.m., Ridge joins Attorney General John D. Ashcroft, FBI Director Robert S. Mueller III, CIA Director George J. Tenet, national security adviser Condoleezza Rice and sometimes Cheney to brief Bush in the Oval Office about terrorist threats.

"The president turns to Ridge every morning and says, 'Do we sustain this alert level?' " said one government official knowledgeable about the briefings. "Ridge acts as a broker for President Bush at those meetings," synthesizing the intelligence data and the "risk management" issues involved in the threat alerts, the official said.

Ridge and Ashcroft were the officials who decided at a Thursday morning meeting with Bush to lower the nation's terrorism threat alert level from orange, signifying a "high" risk of attack, to yellow, representing an "elevated" risk. Starting yesterday, under a presidential order, Ridge has the sole authority to change the alert levels.

"He has a seat at the table, and it's a very large seat," said White House Chief of Staff Andrew H. Card Jr. "He's among the closest of the president's friends in the Cabinet and the political environment."

There are huge risks, for Ridge and Bush, if the biggest reorganization of government in 50 years fails to protect Americans from terrorism. U.S. officials say al Qaeda is continuously looking to stage another spectacular attack on U.S. soil, and Ridge is one of a handful of leaders responsible for stopping it.

Ridge will run what had been two dozen bureaucracies, some of them -- such as the Immigration and Naturalization Service -- with a reputation for dysfunction. Some security experts say his $37 billion budget is as much as $8 billion less than what is needed for the job. And Democrats are targeting every perceived misstep on homeland security as one of their key issues in the 2004 campaign.

On Thursday, five Democratic senators released a "report card" giving Ridge and Bush a D-plus on homeland security, saying "the administration has failed to close several gaping holes in a number of critical infrastructure areas, leaving the nation vulnerable to future terrorist attacks."

"Simply taking over a bunch of federal agencies is not going to get the job done," Sen. Charles E. Schumer (D-N.Y.) said in a statement. "If the new department is going to be more than just an extension of the federal bureaucracy, it needs to put together an agenda based on more than just duct tape and plastic sheeting."

That was a reference to a serious stumble by the agency on Feb. 10, when an official told reporters that families should consider buying duct tape and plastic to prepare a safe room in the event of a chemical attack. This led to widespread public alarm and much lampooning of the Homeland Security Department, and officials soon said the recommendation was far less important than other civil preparedness tips.

Another problem is the extraordinarily thin staff at the department's top ranks, because only a handful of Ridge's closest aides have been confirmed by the Senate. "The people who haven't yet been confirmed can't take any actions" under the law, said Paul C. Light, director of governance studies at the Brookings Institution. "It's very troublesome. You'd think there would be an orange alert in the appointment process."

Said a top GOP adviser to the White House on security matters: "They start with a lot of capital in the bank, but the day this agency launches, it's likely to be drawing down rather than adding capital."

People who know Ridge and Bush say the two men became close as Republican governors of large states in the 1990s, as did their wives, both former librarians. The Bushes visited the Ridges in Harrisburg, and the Ridge children have stayed at the Bush family compound in Maine.

Bush nearly chose Ridge as his running mate in 2000; ultimately, GOP conservatives nixed Ridge because of his abortion rights beliefs.

In 2001, nearing the end of his second term as Pennsylvania governor and barred by law from a third, Ridge, who had little savings after a career in government, had promised his wife he would enter private life and begin making money.

Weeks after the Sept. 11, 2001, attacks, Bush asked Ridge to come to Washington as the White House's homeland security adviser. Ridge said he would take the job for a few months. But he became wrapped up in the task as he confronted the nation's serious security gaps and various agencies' turf consciousness, White House officials and Ridge's friends said.

He also grew deeply frustrated, especially last spring, when Congress demanded that he testify on homeland security, friends said. White House officials said he had no authority and could not be forced to appear before lawmakers. This message -- that "Ridge is nobody," as one official described it -- contradicted Bush's instructions to agencies that Ridge was his surrogate and they must respond to his initiatives.

"There were times he came to the White House and said, 'God, do I really want to be here?' " one associate said.

At times, Ridge considered quitting, given his family's financial situation and concerns about the security and privacy pressures on his wife and two teenage children, friends said. Top White House aides talked him out of it. "The message was, 'The country needs you,' " a senior White House official said. "The president can be pretty persuasive."

Meanwhile, Ridge had told Bush that the lack of security coordination was so profound that only a new and powerful department could secure the nation -- a proposal Bush accepted last June.

"It was a given that Ridge was going to be secretary," one informed official said. By then, Ridge had decided to remain, and he agreed to be secretary last fall, officials said.

"Tom Ridge didn't have to take this job," national security adviser Rice said. "He's doing this at the personal request of the president because he's a patriot."

Department officials were pleased to learn that Ridge was well-received by the public. When market researchers prepared a series of government advertisements to explain the need to prepare for a terrorist strike, they found that people in focus groups responded favorably to Ridge.

"They thought he had the credibility, the expertise and a personal stake in it," said Ken Hines, a vice president at the Martin Agency, who designed the ad campaign.

That could be good news for Bush's political future.

"Ridge is sitting on top of the agency that could make or break Bush's reelection campaign," the Brookings Institution's Light said.