Spanish bank Santander will take over Banco Popular, paying just €1 for its struggling rival that has seen its share price plunge in recent days.
Santander said as part of the rescue it will raise €7bn (£6.1bn) in a share sale to "cover the capital and the provisions required to reinforce the balance sheet of Banco Popular".
The smaller Banco Popular has been struggling since the Eurozone crisis of 2012, after its balance sheet was hit by bad property loans. Its shares have plunged 53% since the beginning of last week.
The European Central Bank (ECB) said Banco Popular was "failing or likely to fail" due to dwindling cash reserves.
The ECB added it had warned the Single Resolution Board, a body charged with winding down failing banks, about Banco Popular's perilous position.
It said: "The significant deterioration of the liquidity situation of the bank in recent days led to a determination that the entity would have, in the near future, been unable to pay its debts or other liabilities as they fell due.
"Consequently, the ECB determined that the bank was failing or likely to fail and duly informed the Single Resolution Board, which adopted a resolution scheme entailing the sale of Banco Popular to Santander."
The ECB added that all Banco Popular customers will have full access to their cash "with no disruption to the economy".
Banco Popular unveiled a €3.5bn loss last year and needs between €3 and €5bn in additional capital, according to analyst estimates.
The bank's management has been struggling to plug its black hole, after a series of bidders reportedly dropped out of an auction to take it over.
Santander said the deal would create Spain's largest bank by lending and by assets and boast 17 million customers. In Portugal, the combined group will serve more than four million clients.