Massachusetts will receive more than $34 million as part of the $13 billion settlement reached Tuesday between the Justice Department and JPMorgan Chase & Co. over the firm’s sale of low-quality mortgage-backed securities that collapsed in value during the housing bust and helped spark the recent financial crisis.

The settlement, the largest against a single company in the nation’s history, resolves numerous federal and state civil claims against practices by JPMorgan and two failing banks it acquired in 2008—Bear Stearns and Washington Mutual --at the US government’s urging.

In Massachusetts, a portion of the $34.4 million will go to consumer relief, fines, attorneys fees, and the Pension Reserves Investment Management Board, which is responsible for investing public retirement funds.

Advertisement - Continue Reading Below

“This settlement today is part of our ongoing effort to hold Wall Street accountable for its role in the financial crisis,” said Massachusetts Attorney General Martha Coakley.

Coakley’s office hasn’t determined how much of the share coming to Massachusetts will go to consumer relief and how that money will be dispersed. In the past, a settlement with a particular bank has resulted in Massachusetts homeowners facing foreclosure because of a subprime mortgage from that particular bank receiving relief to help reduce the principle on their loan.

In the run up to the crisis, Wall Street banks were buying mortgages and bundling them into securities to sell to investors. Many of these mortgages, however were, subprime loans with short-term teaser rates that were sold to consumers with spotty credit histories.

Banks often understated the risks of the mortgage-backed securities. When the housing market crashed, however many homeowners stopping paying their mortgages, which drove down the value of the securities.

JPMorgan’s is the latest settlement regarding mortgage-backed securities that has resulted in money for state, homewoners, and investors. Since 2009, four companies, including Goldman Sachs Group Inc., Morgan Stanley, Royal Bank of Scotland, and Barclays Bank, PLC, have paid $250 million to the state and Massachusetts homeowners.

The JPMorgan settlement came out of President Obama’s financial fraud enforcement task force. Nonetheless, the Obama administration has been criticized in the past for failing to vigorously pursue legal action against Wall Street companies that contributed to the financial crisis. On Tuesday, US Attorney General Eric Holder suggested in a statement that the agency is pursuing investigations on other companies too.

“JPMorgan was not the only financial institution during this period to knowingly bundle toxic loans and sell them to unsuspecting investors, but that is no excuse for the firm’s behavior,” Holder said in a statement. “The size and scope of this resolution should send a clear signal that the Justice Department’s financial fraud investigations are far from over.”

Under the settlement, the nation’s biggest bank will pay more than $7 billion to compensate investors, $4 billion to help struggling homeowners and $2 billion as fines.

Of the money going to investors, $4 billion will resolve government claims that JPMorgan misled mortgage finance giants Fannie Mae and Freddie Mac about risky mortgage securities the bank sold them before the housing market crashed. That part of the deal was announced on Oct. 25. Fannie and Freddie, then private companies, were taken over by the government as part of a bailout.

Still undecided is whether the Justice Department will file criminal charges against JPMorgan. An investigation is under way by the US Attorney’s office in Sacramento, Calif.

The $13 billion JPMorgan will pay under the settlement is a little more than half of the company’s record 2012 net income of $21.3 billion.

Mounting legal costs from government proceedings pushed JPMorgan to a rare loss in this year’s third quarter, which ended in September.

The Justice Department is targeting other banks. In August, Justice accused Bank of America Corp., the second-largest US retail bank, of civil fraud in failing to disclose risks and misleading investors in its sale of $850 million in mortgage bonds in 2008. The Securities and Exchange Commission filed a related lawsuit. The government estimates that investors lost more than $100 million from the bonds sold by Bank of America. Bank of America disputes the allegations.