Banco Santander stepped in to take over stricken rival Banco Popular Espanol in a deal brokered by regulators that imposes billions of losses on investors.

Santander will raise about 7 billion euros ($7.9 billion) in a rights offer to bolster Popular’s balance sheet, acquiring the lender for 1 euro, according to a regulatory filing on Wednesday. Stock and bondholders in Popular will foot losses of about 3.3 billion euros after regulators — saying that the bank was failing — sought a rescue that would avoid taxpayer funding.

The forced sale is the first major action by the Brussels-based Single Resolution Board, set up in January 2015 to deal with euro-area bank failures and wind them down with minimal impact on taxpayers and financial stability. Popular’s situation had become more urgent in recent weeks. New Chairman Emilio Saracho struggled to find a buyer, plans for a possible share sale were complicated by a stock slump and the bank’s liquidity situation worsened.

“Santander is a dealmaker and it was the most likely to go for this,” said Inigo Lecubarri, founding partner of Abaco Asset Management LLP, who helps oversee more than $1 billion invested in mostly European financial stocks. “If the ECB declared Popular as not viable it follows that all these capital instruments go to zero — it’s a very interesting situation.”

Bloomberg reported on Tuesday that Santander was considering a capital increase of more than 5 billion euros as part of a potential offer and also earlier that Popular was looking at measures to boost liquidity. The ECB, in a statement Wednesday, said the decision to force the sale was based on the “significant deterioration of the bank’s liquidity situation.”

The transaction will generate a return on investment of 13 percent to 14 percent in 2020 and add to earnings per share by 2019, Santander said. The bank may also be able to reap the benefit of Popular’s valuable business lending to small and medium-sized companies once the clean-up of its soured assets is complete.

“It’s a unique opportunity at a very good time in the cycle,” Santander Chairman Ana Botin said in a presentation to analysts. Annual cost synergies of almost 500 million euros per year from 2020 will give Santander some of the best efficiency ratios in Spain and Portugal, the bank said.

Botin said Santander was invited on Tuesday to take part in an auction for Popular after supervisors decided the lender couldn’t carry on. The bank only learned its bid had been successful at 6 a.m. on Wednesday, she said in an interview with Bloomberg TV.

“I think this is really great news for Europe, the financial sector and Spain that we were able to do this the way it has been done,” said Botin.

She said Santander would seek to sell at least half of Popular’s real estate in the next 18 months. Santander will make additional provisions for non-performing assets of 7.9 billion including 7.2 billion euros for real estate, the bank said. That will take coverage for real estate and property-linked NPAs to 69 percent from 45 percent.

Santander fell as much as 3.4 percent to 5.60 euros, before paring declines to 5.77 euros as of 12:46 p.m. in Madrid.

The Single Resolution Board transferred all of Popular’s shares and capital instruments to Santander after the European Central Bank declared it “failing or likely to fail.”

Some analysts were cautious about the deal, which will create the biggest banking business in Spain, serving 17 million customers.

The fact that Santander may only have had a few days to check through Popular’s real estate and bad loans and other costs including breaking up joint ventures “generates doubts about whether the management of risks has been adequate,” said Carlos Garcia, a research analyst at Kepler Cheuvreux, in a research note. He downgraded Santander’s stock to hold from buy. Holders of Tier 2 and additional Tier 1 securities may also sue, he said.

In the case of Popular, the SRB used only a few of its resolution powers, including the sale of a failed lender to a sound firm for a token price, the wipeout of shares and additional Tier 1 debt and the conversion of Tier 2 bonds into shares. It didn’t have to resort to more drastic measures foreseen in EU law, such as taking over the institution or imposing losses on senior creditors.