Royal Bank of Scotland deliberately sold packages of “total f**king garbage” mortgages to investors which they knew could ultimately wreck the US housing market, according to internal emails unearthed by US regulators.

The bank - which was rescued by a £45bn UK state bailout at the height of the financial crisis - was one of the biggest participants in the toxic US mortgage underwriting market that helped cause the crash.

Internal emails sent between RBS bankers between 2005 and 2008 have been published as part of a $4.9bn (£3.9bn) settlement finalised between RBS and the US Department of Justice (DoJ) last night over the bank’s role in the scandal.

The role of the residential mortgage-backed securities (RMBS) market in the financial crisis was later popularised by the book The Big Short and Hollywood film adaptation of the same name starring Brad Pitt.

In the settlement document, US regulators describe how top RBS bankers mis-sold tens of billions of dollars worth of mortgage products they knew to be far riskier than they appeared, while pushing the risk “onto investors across the globe”.

In one exchange RBS’s head trader receives an email from a friend saying: “[I’m] sure your parents never imagine[d] they’d raise a son who [would] destroy the housing market in the richest nation on the planet.”