NEW YORK (AP) - Depositors withdrew savings and investors broadly sold off bank shares Monday as the federal government raced to reassure Americans that the banking system was secure after two bank failures fed fears that more financial institutions could fall.

President Joe Biden insisted that the system was safe after the second- and third-largest bank failures in the nation's history happened in the span of 48 hours. In response to the crisis, regulators guaranteed all deposits at the two banks and created a program that effectively thew a lifeline to other banks to shield them from a run on deposits.

“Your deposits will be there when you need them,” Biden told the public, seeking to project calm. He also said the banking executives responsible for the failures would be held accountable.

Regulators closed the Silicon Valley Bank on Friday after depositors rushed to withdraw their funds all at once. The only larger failure in U.S. banking history was the 2008 collapse of Washington Mutual. New York-based Signature Bank also collapsed in the third-largest failure in the U.S.

In both cases, the government agreed to cover deposits, even those that exceeded the federally insured limit of $250,000.

Despite the message from the White House, investors broadly dumped shares in bank stocks. Shares of First Republic Bank plunged more than 70% even after the bank said it was taking emergency funding from the Federal Reserve and additional money from JPMorgan Chase.

First Republic wasn't alone. Shares of well-known franchises like Charles Schwab, Fifth Third Bank, Truist, Comercia and Ally Financial all fell sharply.

The selloff happened in part because the country woke up to a new banking system and investors had to find the winners and losers, banking experts said.

There was no guarantee that the anxiety would not spread. Customers at other banks with deposits over the $250,000 limit remained at risk of losing access to their money for a time.

Just because the government covered for Silicon Valley Bank and Signature Bank “doesn't mean they are going to cover for these smaller banks,” said Chris Caulfield, a senior partner at West Monroe.

But the government's actions suggested it would stand behind all deposits if doing so prevents damage to the broader economy.

“Everything is now covered. That's a fact. No matter how specialized or isolated your bank is, if there's a risk of contagion, regulators have made it clear that they are going to intervene,” said Norbert Michel, a banking policy expert at the libertarian-leaning Cato Institute.

Ian Brandt, who had an account at Signature Bank, visited a branch in New York City down the street from the law firm where he is attorney. After being unable to reach someone by phone, he walked to the bank to see if it was open.

Asked if he felt any assurance after the bank's deposits were secured by the government, Brandt said, “For the moment.”

Amid the selloff of midsize banks, investors kept relatively calm over the health of the nation's biggest banking bulwarks, such as JPMorgan Chase, Citigroup, Bank of America and Wells Fargo. Investors apparently concluded that the only place to be safe in banking was with the nation's most strictly regulated institutions.

Regional banks were seen as the riskiest, since they do not have the scale to compete against larger competitors. Large account balances - once seen as a positive sign that a bank's clients are well off - were a liability since they could be withdrawn at the first sign of trouble.

“I wouldn't want to be running a regional bank right now where my services are no different from my competition,” Caulfield said.

International regulators also had to step in to ease fears. The Bank of England and U.K. Treasury said they facilitated the sale of a Silicon Valley Bank subsidiary in London to HSBC, Europe's biggest bank. The deal protected 6.7 billion pounds ($8.1 billion) of deposits.

Under the plan announced by U.S. regulators, depositors at Silicon Valley Bank and Signature Bank were able to access their money. A new Fed program will allow banks to post those securities as collateral and borrow from the emergency facility.

The Treasury has set aside $25 billion to offset any losses. However, Fed officials said they do not expect to have to use that money, given that the securities posted as collateral have a very low risk of default.

New York bank regulators took possession of Signature Bank on Sunday, ousting its leaders and handing day-to-day control over to the Federal Deposit Insurance Corp.

New York Gov. Kathy Hochul said the decision by the state Department of Financial Services was aimed at holding off a bigger crisis involving more banks.

“Our view was to make sure that the entire banking community here in New York was stable, that we can project calm,” Hochul said Monday at a news conference.

She said a high volume of withdrawals that began last week continued with online transactions through the weekend. The bank was open Monday under the name of Signature Bridge Bank.

Signature, which was founded more than two decades ago, has about 40 offices across the country and says it focuses on banking for privately owned businesses, their owners and senior managers.

Though Sunday's steps marked the most extensive government intervention in the banking system since the 2008 financial crisis, the actions were relatively limited compared with 15 years ago.

The two failed banks themselves have not been rescued, and taxpayer money has not been provided to them.

Some prominent Silicon Valley Bank executives feared that if Washington did not rescue their bank, customers would make runs on other financial institutions. Stock prices plunged at other banks that cater to technology companies, including First Republic and PacWest Bank.

Among the bank's customers are a range of companies, including many California wineries that rely on Silicon Valley Bank for loans and technology startups devoted to combating climate change.

Michele Barry, a teacher who was at Silicon Valley Bank on Monday, said members of the FDIC and bank employees were available to answer questions.

Barry, who also runs an after-school program for children, wanted to make sure that her four employees would be paid. She was told that all checks from Friday would be honored, along with her automatic payments.

Barry left enough in her account to cover the payments, but she transferred the bulk of her money over to another bank. She said Biden's reassurance was helpful.

“I'm from South Africa. Chances are if this happened in South Africa, nobody would insure your money,” she said.

--- Rugaber and Megerian reported from Washington. Sweet and Bussewitz reported from New York. Associated Press writers Hope Yen in Washington; Michelle Chapman in New York; Jennifer McDermott in Providence, Rhode Island; Geoff Mulvihill in Cherry Hill, New Jersey; and Danica Kirka in London contributed to this report.