Logos of UBS and Credit Suisse on separate buildingsImage source, EPA

Troubled bank Credit Suisse has been rescued by its Swiss rival UBS in a government-backed deal.

Sunday evening's announcement came after a weekend of emergency talks in Switzerland between the two banks and the country's financial regulators.

The Swiss National Bank said the deal was the best way to restore the confidence of financial markets and to manage risks to the economy.

Both banks will be given a liquidity assistance loan of up to $110bn.

The federal government said in order to reduce any risks for UBS it would grant a guarantee against potential losses worth $9.6bn (£7.9bn).

Regulators had hoped to facilitate a deal before markets reopened on Monday.

There has been no word yet from the Bank of England or the UK Treasury which have been monitoring the situation.

In a statement Switzerland's central bank said "a solution has been found to secure financial stability and protect the Swiss economy in this exceptional situation".

It comes after Credit Suisse, one of around 30 banks worldwide deemed too big to fail, suffered losses last week following the failure of two smaller US institutions over the past fortnight.

The 167-year-old bank is loss-making and has faced a string of problems in recent years, including money laundering charges.