WASHINGTON (AP) — Citigroup agreed Monday to pay $7 billion to settle a federal investigation into its handling of risky subprime mortgages, admitting to a pattern of deception that Attorney General Eric Holder said “shattered lives” and contributed to the worst financial crisis in decades.

The settlement represents a moment of reckoning for one of the country’s biggest and most significant banks, which is now accountable for providing some financial support to Americans whose lives were dismantled by the largest economic meltdown since the Great Depression.

In addition to a $4 billion civil penalty being paid to the federal government, the bank will also pay $2.5 billion in consumer relief to help borrowers who lost their homes to foreclosure and about $500 million to settle claims from state attorneys general and the Federal Deposit Insurance Corporation.

The agreement does not preclude the possibility of criminal prosecutions for the bank or individual employees in the future, Holder said.

The $7 billion settlement, which represents about half of Citigroup’s $13.7 billion profit last year, is the latest substantial penalty sought for a bank or mortgage company at the epicenter of the housing crisis. The Justice Department, criticized for not being aggressive enough in targeting financial misconduct, has in the last year reached a $13 billion deal with JPMorgan Chase & Co., the nation’s largest bank, and also sued Bank of America Corp. for misleading investors in its sale of mortgage-linked securities.

Yet the settlement packages pale in size compared to the broader damages caused by the Great Recession. The unemployment rate spiked to 10 percent as millions lost their jobs and their homes, causing losses that totaled in the trillions of dollars. Consumers groups criticized the settlement as a sweetheart deal.

“In the context of the damage done, the damage even described by the attorney general, we’re not even in the same ballpark,” said Bartlett Naylor, a financial policy advocate for Public Citizen, which represents consumer interests.

The settlement stems from the sale of toxic securities made up of subprime mortgages, which led to both the housing boom and bust that triggered the Great Recession at the end of 2007. Banks, including Citigroup, minimized the risks of subprime mortgages when packaging and selling them to mutual funds, investment trusts and pensions, as well as other banks and investors.

The securities contained residential mortgages from borrowers who were unlikely to be able to repay their loans, yet were publicly promoted as relatively safe investments until the housing market collapsed in 2006 and 2007 and investors suffered billions of dollars in losses. Those losses triggered a financial crisis that pushed the economy into the worst recession since the 1930s.

One Citigroup trader wrote in an internal email that he “would not be surprised if half of these loans went down” and said it was “amazing that some of these loans were closed at all,” the Justice Department said. Meanwhile, the bank increased its profits and share of the market.

“They did so at the expense of millions of ordinary Americans and investors of all types — including other financial institutions, universities and pension funds, cities and towns, and even hospitals and religious charities,” Holder said at a news conference.

Justice Department officials called the $4 billion component the largest civil penalty of its kind. It will not be tax-deductible.

The $2.5 billion in consumer relief is directed at underwater homeowners and borrowers in areas of the country with high numbers of distressed properties and foreclosures. The sum includes refinancing for homeowners struggling with high interest rates on their mortgages, closing cost help for borrowers who lost homes to foreclosure, donations to community development funds and financing for construction and affordable rental housing.

The deal and others like it will probably benefit hundreds of thousands of Americans, said Associate Attorney General Tony West, though Holder also acknowledged that many people would not be adequately compensated.

Citigroup should have the capital needed to absorb the $7 billion settlement, said Gerard Cassidy, a managing director and analyst at RBC Capital Markets. In fact, investors were relieved that the issue was no longer confronting the bank and pushed up Citigroup’s stock price on Monday, and CEO Michael Corbat said the settlement ends all pending civil investigations related to mortgage-backed securities.

But the “unintended consequence” of the settlement is that banks such as Citigroup are less likely to lend, hurting would-be homebuyers with student debt who are seeking a mortgage.

“Banks won’t go near those customers because, in our opinion, the severity of the penalties that they paid,” Cassidy said.

The settlement followed months of negotiations in which the two sides were often far apart. The Justice Department prepared to sue the bank last month after it offered to pay under $4 billion, substantially less than what the government was seeking.

After JPMorgan’s $13 billion deal last year involving similar toxic mortgage-backed securities, Citigroup argued that it should settle for a comparatively modest sum because it issued fewer mortgages than JPMorgan and the subsidiaries that the bank acquired during the recession. But the Justice Department countered that the evidence showed that Citigroup offered a greater share of troubled mortgage-backed securities.

Investors shrugged off the settlement, a sign they expect Citigroup will continue to operate without much disruption. Shares in Citi rose $1.42 — or 3 percent — to $48.42 because the bank beat the expectations in the market, after adjusting for the second-quarter $3.8 billion charge related to the Justice Department settlement.

The bank said its net income dropped in the second quarter after the settlement was arranged. On a per-share basis, net income was 3 cents, compared with $1.34 in the second quarter a year earlier. Excluding the charges and an accounting loss, the bank’s second-quarter profit rose 1 percent to $3.93 billion, or $1.24 a share.

Revenue was $19.4 billion, excluding the accounting loss, compared with $20 billion a year earlier.

Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.