Royal Bank of Scotland is to pay $44m (£34m) to settle charges of securities fraud in the US, the Department of Justice has confirmed.

Deirdre Daly, US Attorney for the District of Connecticut, said RBS would pay a fine of $35m and compensation of $9m to more than 30 victims after it entered into a non-prosecution agreement.

The charges relate to RBS attempting to increase its profits at the expense of clients by misrepresenting prices and commissions in trades of mortgage-backed securities.

Prosecutors said the scheme was conducted from 2008 to 2013 and that the bank's employees perpetrated it "with the knowledge, encouragement and participation of RBS supervisors".

"For years, RBS fostered a culture of securities fraud," Daly said. "Those in a position of authority taught and encouraged fraudulent trading practices.

"Worse, those supervisors and compliance personnel then took steps to prevent victims and honest RBS employees from discovering and exposing the scheme."

Daly added that RBS was able to avoid criminal charges only because it voluntarily came forward with information about its own misconduct, along with its "extraordinary" cooperation during the government's investigation.

Barclays, Citigroup, Morgan Stanley and Goldman Sachs were among the victims of the fraud scheme and are in line to receive compensation.

Daly said: "By entering into this agreement, RBS has admitted the seriousness of its past criminal conduct and made a clean break.

"This is another step in our continuing joint effort to make clear to broker-dealers that lying to customers to increase profits is a crime, and that only by rooting out and reporting such misconduct on their own trading floors can they avoid significant criminal liability."

The fraud scheme was mainly orchestrated in Stamford, Connecticut, through RBS's now-defunct US asset-backed securities, mortgage-backed securities and commercial mortgage-backed securities trading group.

Two former managing directors at RBS pleaded guilty to conspiracy to commit the securities fraud in 2015 and have been cooperating with the US investigation.