Wells Fargo & Co.   (WFC - Get Report) will pay about $2 billion in penalties for misrepresenting loan quality in mortgage-backed securities, the Justice Department said on Wednesday.

The San Francisco-based bank was alleged to have originated and sold tens of thousands of residential mortgage loans it knew contained misstated income information and didn't meet the quality that Wells represented.

Wells Fargo sold at least 73,539 stated income loans that were included in RMBS between 2005 to 2007, and almost half of those loans have defaulted, resulting in billions of dollars in losses to investors., according to the Justice Department's press release.

Wells is not admitting to liability. The bank said the amount of the settlement was fully accrued as of June 30, 2018.

"Abuses in the mortgage-backed securities industry led to a financial crisis that devastated millions of Americans," said Alex G. Tse, the acting U.S. Attorney for the Northern District of California, in a statement.

It's the latest hurdle for Wells Fargo, which is struggling to put behind it another issue regarding product sales. In April, the bank paid $1 billion to settle abuses in sales of products related to auto and mortgage loans. The mortgage-backed securities at the center of the agreement announced on Wednesday date back more than a decade, to 2005 to 2007, and are not related.

"We continue to believe that intensity of regulatory scrutiny facing Wells Fargo will remain elevated for the foreseeable future," said RBC Capital Markets analyst Gerard Cassidy, in e-mail. "Although Wells Fargo has made progress in improving its controls and procedures, we would not be surprised to see progress remain frustratingly slow."

Wells Fargo shares rose 0.9% to $57.81 as of 3:15 p.m. New York time.

"We are pleased to put behind us these legacy issues regarding claims related to residential mortgage-backed securities activities that occurred more than a decade ago," said Wells Fargo CEO Tim Sloan in a statement.