When federal regulators finally decided Wednesday night to negotiate the sale of the National Bank of Washington (NBW) to Riggs National Bank, they had one overriding goal in mind: avoiding a high-profile bank closing in the nation's capital that could have frightened depositors throughout the nation.

Only hours before, sources said, officials of the Federal Deposit Insurance Corp. had decided they were going to close NBW, pay off depositors and sell the bank's assets on a piecemeal basis.

They had received only three bids for the failed NBW -- one from Crestar Financial Corp., one from Sovran Financial Corp. and one from Riggs. None of the interested parties was willing to buy the entire bank, which had loans and other assets of $1.6 billion. And only one, Riggs, was willing to pay the government anything at all for NBW's $1 billion in deposits, sources said.

There was pressure for the FDIC to act. For months, NBW had been kept afloat by millions of dollars of loans from the Federal Reserve Bank of Richmond, the area's lender of last resort for financial institutions. It looked like the best thing to do was to close the bank promptly, even though it would have cost the FDIC $1 billion in cash up front as depositors were paid off -- money the fund could hardly afford.

Then, Riggs Chairman Joe L. Allbritton played his trump card.

During 11th-hour negotiations, Allbritton said he was willing to do more than just take control of NBW's deposits. In addition to paying $33 million for the deposits, he said he would agree to take on $1.1 billion in NBW loans and other assets, relieving the government of the burden of handling all of NBW's assets.

But Allbritton had one condition. During the next four months, he wanted the right to give back any loans and other assets he decided he didn't want to keep.

Allbritton's willingness to take some NBW loans proved to be enough to persuade government regulators that even if it cost more, a smooth transition from NBW to Riggs was better than jarring depositors across the country by closing a bank in the nation's capital.

Last Friday morning, the FDIC notified the Office of the Comptroller of the Currency (OCC), which regulates national banks, that it had chosen Allbritton and Riggs as its winning bidder. The Federal Reserve then demanded repayment of the millions of dollars NBW had borrowed over the past three months. And when NBW failed to come up with that money, the bank was declared insolvent and sold to Riggs.

The deal with Allbritton, who owns 35 percent of Riggs, will cost the FDIC at least $500 million, making NBW one of the 10 most costly bank rescues in the nation's history.

The high cost of rescuing NBW seems a long way from the encouraging words spoken just a week earlier by William Ogden, the federally appointed conservator who took over NBW's operations after regulators seized control of the bank on Aug. 1. "This is not a failed bank," Ogden told reporters shortly after his appointment. "NBW still has many positive attributes."

Ogden told senior management that the Federal Reserve had guaranteed an unlimited source of funds for NBW. And he assured employees that their jobs were secure, that the bank was safe.

"At that point, we just didn't know what would happen," OCC spokeswoman Lenora Cross said yesterday. She said the bank still had equity capital, or a cash cushion, when regulators took control.

"We would have tried to keep it going" if there had been a buyer willing to purchase the entire operation, she said. "But that just didn't happen."

Sources said last week's hurried negotiations resulted largely from poor planning at the FDIC. Although the bank's parent firm, Washington Bancorporation (WBC), had acknowledged many times during the past three months that it was in trouble, the FDIC had done nothing to prepare for a government takeover.

When WBC filed for Chapter 11 bankruptcy protection from creditors two weeks ago, prompting regulators to seize the bank, sources said the FDIC did not have any potential bidders lined up. Typically, the FDIC quietly searches for a buyer for a faltering bank even before it actually fails.

"They weren't ready for this," said one source close to the negotiations. "When WBC declared bankruptcy, all of a sudden, there was a real time pressure."

For Riggs, which had long expressed interest in acquiring NBW, the pressure to complete the deal quickly may have given Allbritton, a savvy dealmaker who owns Washington's WJLA-TV, Channel 7, an added advantage.

For all of the scrambling last week, the 18 branches of NBW -- now carrying Riggs signs -- continued their business as usual yesterday. Customers said they were content to bank with Riggs, as long as the new owners provided a high level of customer service.

"I won't change my accounts if everything goes all right," said Stephen X. Graham, who was banking at a downtown NBW branch. "I think it will be a pretty easy switch," said Robert H. Wilbur, another former NBW customer. "As long as the service stays the same, I'll stay."

Staff writer Spencer S. Hsu contributed to this report.