MADRID — Spain’s banking crisis worsened Friday as the board of Bankia, the country’s biggest mortgage lender, warned that it would need an additional 19 billion euros ($23.88 billion), far beyond what the government estimated when it seized the bank and its portfolio of delinquent real estate loans earlier this month.

The government is trying to head off a collapse of the bank, which could threaten the Spanish banking industry and reverberate through the financial centers of Europe and beyond. The fear is that it will not have the money to save its banks, and their $1.25 trillion in deposits, and will need a rescue by the rest of Europe — even as political and financial leaders struggle to resolve Greece’s debt debacle.

Bankia’s announcement came as Standard & Poor’s, the credit ratings agency, downgraded Bankia and two other banks, Banco Popular and Bankinter, to junk status and lowered the ratings of two other Spanish banks also staggered by mounting bad loans. A junk rating could make it even harder for Bankia to borrow its way out of trouble.

The rising fear now is that the recent steady outflow of deposits from Spain’s banks, which are suffering from the bursting of Spain’s real estate bubble, to institutions outside the country could eventually turn into the sort of bank run that almost brought the financial world to its knees after the collapse of Lehman Brothers in 2008.