The agreement settles a civil action filed in December 2016 in which the USA sought civil penalties for alleged conduct related to Barclays' underwriting and issuance of residential mortgage-backed securities (RMBS) between 2005 and 2007.
"This settlement reflects the ongoing commitment of the Department of Justice, and this Office, to hold banks and other entities and individuals accountable for their fraudulent conduct", stated United States Attorney Donoghue. The Justice Department under the Obama administration was asking for as much as $8 billion from the British bank, according to industry analysts and media reports at the time. In 2013, JPMorgan Chase paid $13 billion.
Two former Barclays executives will pay fines as well.
The bank last month reported a £1.9bn loss for 2017 after U.S. tax reforms and an accounting write-down from the sale of its Africa businesses resulted in big one-off charges. KBW's Firth called RBS the "poster child" for the RMBS scandal, estimating that bank's settlement will reach $9 billion.
With the settlement now in the rear-view mirror, Barclays said it plans to pay a 6.5 pence dividend for 2018. Then-Attorney General Loretta Lynch lashed out at the bank.
The Justice Department originally sued Barclays and several of its US affiliates in late 2016 over the sale of risky mortgage-backed securities.
But Barclays vowed to fight the lawsuit, saying it had an obligation to its shareholders to defend itself against "unreasonable allegations and demand".
The two former Barclays executives named as defendants in the suit are Paul Menefee, who was the lender's head banker on its subprime RMBS securitisations, and John Carroll, who served as head trader for subprime loan acquisitions.
The law firm representing Carroll echoed similar statements.
Jes Staley, Barclays chief executive, hailed the "fair and proportionate settlement".
Menefee agreed to settle the case so he could put the matter behind him, his attorneys said in a statement. Glen McGorty, a lawyer for Carroll, said Carroll is "pleased that the government has relented in its efforts to prove wrongdoing where none exists".
USA federal authorities have faced public outrage and hostile scrutiny from lawmakers over the perceived failure to bring criminal cases against any senior bank executives for their roles in sparking the crisis - despite a Justice Department finding that industry practices involved widespread fraudulent conduct.
Saying the case against their client "should never have been brought", defense lawyers Barry Berke and Dani James said Menefee "worked tirelessly, diligently and in good faith at all times on behalf of Barclays and its investors".