Citigroup will pay $7B to settle a Justice Department investigation into subprime mortgages

Citigroup said it agreed to pay $7 billion to settle a U.S. government investigation into mortgage-backed securities the bank sold in the run-up to the 2008 financial crisis.

The settlement figure was more that twice what many analysts expected earlier this year but less than the $12 billion the government had sought in negotiations with the bank.

Read MoreCiti profit hit by mortgage securities charge

Citigroup said it took a related pre-tax charge of about $3.8 billion in the second quarter. Taking the charge into account, the bank reported a 96 percent drop in earnings.

Citigroup's shares were up 3.9 percent at $48.82 in premarket trading on Monday. The stock gained 1.4 percent after the settlement was announced an hour before the results. (Click here for the latest quote.)

The settlement, signed over the weekend, caps months of negotiations, during which, sources said, the government even threatened to sue the bank.

"The penalty is appropriate given the strength of the evidence of the wrongdoing committed by Citi," U.S. Attorney General Eric Holder said in a statement on Monday.

Read MoreCiti a 'buy' despite likely $7B settlement: Mike Mayo

"Despite the fact that Citigroup learned of serious and widespread defects among the increasingly risky loans they were securitizing, the bank and its employees concealed these defects," Holder added.

Citigroup is the second major bank to settle with authorities since President Barack Obama ordered the formation of a task force to investigate the sale and packaging of toxic home loans that were at the center of the 2008 financial crisis.

JPMorgan Chase, the largest U.S. bank, last year agreed to pay $13 billion to settle government probes over the packaging of toxic mortgages.

Bank of America has also been negotiating with the Justice Department over similar claims.

Citigroup said it would pay $4.5 billion in cash and provide $2.5 billion in consumer relief.

Read MoreCitigroup 'a very high-risk company': Dick Bove

The cash portion consists of a $4 billion civil payment to the Justice Department and $500 million in compensatory payments to state attorneys general and the Federal Deposit Insurance Corp.

The bank said consumer relief will include financing for the construction of affordable multifamily rental housing and principal reduction and forbearance for residential loans.

Citigroup said it would provide the consumer relief by the end of 2018.

By Reuters