UBS sealed a deal to buy rival Swiss bank Credit Suisse to avoid further turmoil in global banking, Swiss authorities said.
Swiss regulators had been forced to step in and orchestrate a deal to prevent a crisis of confidence in Credit Suisse spilling over into the broader financial system.
The Swiss finance minister said the bankruptcy of a globally important bank would have created irreparable consequences for financial markets.
It was not yet clear if the deal is enough to restore trust in lenders around the world.
The first indication could come when stock markets open in a few hours in Asia, Australia and New Zealand.
The Swiss central bank will supply substantial liquidity to the merged bank, it said at a news conference in the Swiss capital, Bern.
It said the deal includes 100 billion Swiss francs ($100.6 billion) in liquidity assistance for UBS and Credit Suisse.
"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," the Swiss central bank said.
UBS Group will acquire Credit Suisse for 3 billion Swiss Francs (€3 billion), the companies said.
The Swiss Financial Market Supervisory Authority (FINMA) said it will be possible to continue all the business activities of both banks with no restrictions or interruptions.
FINMA said it will coordinate with national and international authorities, namely the US Federal Reserve and the British Prudential Regulation Authority.
Officials have been racing to rescue the 167-year-old bank, among the world's largest wealth managers, after a brutal week saw the second- and third-largest US bank failures in history.
As one of 30 global banks seen as systemically important, a deal for Credit Suisse could ripple through global financial markets.
At least two major banks in Europe are examining scenarios of contagion possibly spreading in the region's banking sector and looking to the Federal Reserve and the European Central Bank to step in with stronger signals of support, two senior executives with knowledge of the discussions said.
The weekend negotiations follow efforts in Europe and the United States to support the sector since the collapse of US lenders Silicon Valley Bank and Signature Bank. US President Joe Biden's administration moved to backstop consumer deposits while the Swiss central bank lent billions to Credit Suisse to stabilize its balance sheet.
The fallout from the crisis of confidence in Credit Suisse and the failure of the two US banks could ripple through the financial system this week, the two executives separately told Reuters on Sunday.
Credit Suisse shares lost a quarter of their value last week. The bank was forced to tap $54 billion (€50.4 billion) in central bank funding as it tried to recover from scandals that have undermined the confidence of investors and clients.
Swiss authorities are examining imposing losses on Credit Suisse bondholders as part of a rescue of the bank, two sources with knowledge of the matter said.
However, European regulators are apprehensive about such a move for fear that it could hit investor confidence elsewhere in Europe's financial sector, the sources said, speaking on the condition of anonymity.