Royal Bank of Scotland has agreed a $4.9bn (£3.6bn) penalty with US regulators to end a long-running probe into its actions in the lead-up to the financial crisis.

RBS Bank

RBS boss Ross McEwan said the agreement in principle with the US Justice Department (DoJ) was “a milestone”.

The probe into RBS’s sale of financial products from 2005 to 2007 has been a financial cloud hanging over the bank.

The DoJ said further details must be negotiated before a final deal is done.

Mr McEwan said: “Today’s announcement is a milestone moment for the bank.

“Reaching this settlement in principle with the US Department of Justice will, when finalised, allows us to deal with this significant remaining legacy issue and is the price we have to pay for the global ambitions pursued by this bank before the crisis.”

He said that “removing the uncertainty” would mean that RBS, bailed out by the UK taxpayer in 2008, would make the bank much stronger.

RBS said about $3.6bn of the penalty would be covered by money already set aside. Many analysts had forecast that the settlement could be larger than $4.9bn.

RBS knew it faced a very large penalty from the US DoJ for selling financial products that were far more risky than it admitted.

But guesses as to the size of the fine have ranged between $1bn and $9bn.

RBS has already put aside about 70% of the penalty announced on Thursday – but the uncertainty around this issue has over-shadowed the bank’s recovery for years, and made its shares hard to value.

It is a milestone moment for the bank, says RBS chief executive Ross McEwan.

Though yet to be finalised with the DoJ, this deal will help open the way to a new stage in the bank’s recovery.

News that a deal is close to being finalised is likely to raise speculation about when the government may begin selling its 71% stake in RBS.

Chancellor Philip Hammond said last year that he was reluctant to sell shares while the DoJ probe had still to be resolved.