Image copyright Getty Images Image caption The US Attorney General said the bank had admitted its misdeeds

Banking giant Citigroup will pay $7bn (£4bn) to US authorities to settle an investigation into risky sub-prime mortgages.

Citigroup will pay $4bn (£bn) to the Department of Justice and $2.5bn for "consumer relief".

Consumer relief includes investment in affordable homes and mortgage relief.

Following the decision, the bank reported a stronger than predicted quarterly profit, and saw its share price rise by 3.02% to $48.42 (£28.34).

Government investigations

Second-quarter earnings fell by 96% to $181m, but that was after a $3.8bn (£2.2bn) charge related to the settlement.

The settlement stems from the sale of securities made up of sub-prime mortgages, which were at the centre of the 2008 financial crisis.

Citigroup is the second major bank to pay a settlement since President Obama launched an investigation into housing loans.

JPMorgan Chase paid $13bn last year to settle government investigations.

The Citigroup fines are said to have surprised stock analysts and people inside the bank, who had hoped to settle for less.

'Move forward'

According to the US Attorney General, Eric Holder, "under the terms of this settlement, the bank has admitted to its misdeeds in great detail".

He said the settlement "does not absolve Citigroup or its employees from facing any possible criminal charges in the future".

Citigroup's chief executive, Michael L Corbat, said that the decision was the right one for shareholders.

"We believe that this settlement is in the best interests of our shareholders, and allows us to move forward and to focus on the future, not the past," he said.

Investors welcomed the decision, as the company's share price rose in New York trading.