Media playback is unsupported on your device Media caption Jes Staley wants 'to protect the integrity of the bank'

Barclays has agreed to pay $2bn (£1.4bn) to settle a lawsuit brought by the US government over the sale of mortgage-backed securities.

The US alleged that the bank had misled investors about the quality of loans backing the securities in the run-up to the financial crisis.

Barclays chief executive Jes Staley said the bank was "pleased that we have been able to reach a fair and proportionate settlement".

The bank did not admit liability.

US attorney for the eastern district of New York Richard Donoghue said: "The substantial penalty Barclays and its executives have agreed to pay is an important step in recognising the harm that was caused to the national economy and to investors in residential mortgage-backed securities."

Priority case

Barclays said the settlement resolves "all actual and potential civil claims" by the US Department of Justice related to the case, which involved the sale of securities between 2005 and 2007.

Mr Staley added: "It has been a priority for this management team from the start to resolve these historic issues in a timely and appropriate manner wherever possible.

"The completion of our restructuring in 2017, and putting significant legacy matters like this one behind us, mean Barclays is well positioned to produce stronger earnings going forward, and to start returning a greater proportion of those earnings to our shareholders over time."

Two former Barclays executives also agreed to pay a total of $2m.

Paul Menefee, who was Barclay's subprime securitisation head, and John Carroll, Barclays' head trader for subprime loan acquisitions, agreed to pay the money to dismiss all claims against them.

Federal prosecutors said that the alleged scheme involved 36 residential mortgage-backed security deals covering more than $31bn of mortgage loans.

More than half of the mortgages backing the securities defaulted, the suit alleged.

Investors had included credit unions, pension plans, charitable and religious organisations, university endowments, and financial institutions.