UBS agreed to buy its embattled rival Credit Suisse for $3.2 billion Sunday, with Swiss regulators playing a key part in the deal as governments looked to stem a contagion threatening the global banking system.

“With the takeover of Credit Suisse by UBS, a solution has been found to secure financial stability and protect the Swiss economy in this exceptional situation,” read a statement from the Swiss National Bank, which noted the central bank worked with the Swiss government and the Swiss Financial Market Supervisory Authority to bring about the combination of the country’s two largest banks.

Read the rest of the story at NBC News