A man with a motorcycle helmet walks in front Banco Popular branch on June 7, 2017 in Vilanova i la Geltru near Barcelona after European authorities announced the sale of Spain's Banco Popular to compatriot Banco Santander | Lluis Gene/AFP via Getty Images Europe’s banking rules show teeth By forcing a takeover of Spain’s failing Banco Popular, EU regulators pulled off a text-book bank rescue.

By saving a Spanish bank, the EU just salvaged its own bank rescue rules.

Only last week, Brussels was criticized for allowing the bailout of Monte dei Paschi di Siena, an Italian bank, with public funds. But on Wednesday, the Single Resolution Board — an EU agency founded after the financial crisis to deal with failing banks — stepped up to the plate, exactly as it was supposed to.

For the first time since it was set up at the start of 2015, the SRB enacted a "resolution scheme" forcing Banco Popular to sell itself to Banco Santander for just €1. By engineering Spain's largest bank to take over of its sixth-largest, EU regulators allowed the ailing Popular operation to continue under normal business conditions while preventing a messy financial meltdown. Popular had lost more than half of its market value at the start of June.

The entire process, from regulators declaring Popular was collapsing to its authorized rescue, took less than 24 hours. It had been "a long night,” the SRB’s Chair Elke König told reporters on Wednesday morning in Brussels.

On Tuesday evening, the European Central Bank determined that the Spanish lender was “failing or likely to fail,” officially triggering the SRB's intervention. In the subsequent hours, the Brussels-based regulator engaged with Spanish authorities to arrange the sale. The decision was then handed over to the European Commission for its endorsement, which was granted before markets opened so that Popular's branches could open as usual on Wednesday morning.

“This resolution decision showed there was no taxpayer involved, there was no fund aid needed in this case,” said König. "We really could enact a solution based on private means." Instead of the taxpayer footing the bill, the SRB exercised the EU's so-called bail-in mechanism to transfer the losses onto Popular's shareholders and creditors.

The use of the EU’s banking bail-in rules is new, and this was an easy first test for the SRB — Popular is a relatively small bank, whereas MPS is Italy’s third-largest lender. In the case of MPS, the SRB isn't involved as the bank is set to be revived under an exception to the EU’s bank rescue rules known as “precautionary recapitalization,” from the Italian government.

When asked to compare the two cases, König said she would not comment on any specific banks. But, she added, “keep in mind each and every resolution plan, and each and every case will always be tailor-made. There is not one-size-fits-all.”

She's right.

Whereas Italy dragged its feet on cleaning up its banking sector, the Spanish government in 2012 set up a so-called bad bank — Sareb — to manage the assets of the lenders that received state aid and to which most of the banks’ bad loans were offloaded. Italy wasn’t as quick to act and by the time the government woke up to the extent of the country’s banking trouble, the EU's new bank rescue rules had kicked in.

Markets reacted positively to the SRB's move on Wednesday.

Spain’s Economy Minister Luis de Guindos emphasized that there’s no risk “of contagion between sovereign and banking risk, as was the case in the past,” adding in a statement “the situation now is very different from that of 2012.”

Spain went through a €40 billion bank bailout that year and its financial sector has gone through a massive consolidation since. In 2007, there were more than 50 financial institutions in the country; by 2016, just 14 remained.

Among the survivors, Popular embarked on a series of share sales instead of resorting to a bailout, raising €5.5 billion to bolster a balance sheet weakened by the popping of Spain's real-estate bubble.

Yet Popular still carried €37 billion of non-performing assets and in the past week, investors worried about an imminent collapse dumped its shares. Now, the investors who failed to get out have lost everything.

But Popular will live on under the wings of Santander, which sees it as a “very good strategic fit” given its strength in small-business lending.

Meanwhile, the EU regulators also get to smile and show that their rules aren't toothless in the face of Europe's still-massive banking problems.

Diego Torres, Silvia Sciorilli Borrelli and Johanna Treeck contributed reporting.