A federal regulator that helped forge a tentative $13 billion settlement with JPMorgan Chase split off with its own deal Friday, extracting a $4 billion payout from the nation’s biggest bank.

The regulator, the Federal Housing Finance Agency, ran ahead of its fellow regulators as the broader deal was slow to materialize.

That $4 billion was initially seen as a crucial element of the preliminary $13 billion settlement that JPMorgan reached last week. The deal, which the Justice Department has taken the lead in negotiating, would resolve an array of investigations from state and federal authorities that suspect the bank misled investors about the risks of mortgage securities it sold in the lead up to the financial crisis.

The settlement with the housing regulator would help JPMorgan put one of its costliest cases behind it.

In a 2011 lawsuit, the regulator accused JPMorgan, Bear Stearns and Washington Mutual of selling mortgage securities to Fannie Mae and Freddie Mac, the government-controlled housing-finance companies. The banks, the agency claimed, did not fully disclose the risks of the securities, which ultimately imploded.

“This is a significant step as the government and JPMorgan Chase move to address outstanding mortgage-related issues,” Edward DeMarco, the acting director of the housing agency, said in a statement.

In its own statement, JPMorgan called the deal “an important step towards a broader resolution” with the Justice Department and the other government authorities.

The $13 billion deal has implications beyond the housing agency. Under the current terms, the bank would also pay a roughly $2 billion to $3 billion fine to prosecutors in California, commit $4 billion to help struggling homeowners reduce their mortgage balances and pay roughly $6 billion to state attorneys general and other officials who would then pass the money on to investors who sustained losses on mortgage securities.

JPMorgan sold $33 billion in mortgage securities to Fannie and Freddie between 2005 and 2007, according to the agency. That was the second-most sold to Fannie and Freddie ahead of the crisis, behind only Bank of America. The securities soured after the housing bubble burst in 2007, losing billions in value.

The settlement is the start of what could be the largest penalty the government has extracted from a company for actions related to the financial crisis. The crisis, triggered by vast sales of risky mortgage securities, plunged the economy into the deepest recession since the Great Depression.

The government rescued Fannie and Freddie during the financial crisis when both were on the verge of collapse. The companies received taxpayer aid totaling $187 billion. They have since become profitable and repaid $146 billion.

New York-based JPMorgan will pay about $2.74 billion to Freddie and $1.26 billion to Fannie for the securities it sold. JPMorgan is also paying $1.1 billion for home loans it sold to Fannie and Freddie ahead of the crisis.

A number of big banks, including JPMorgan, Goldman Sachs and Citigroup, previously have been accused of abuses in sales of securities linked to mortgages in the years leading up to the crisis. Together, they have paid hundreds of millions in penalties to settle civil charges brought by the SEC, which accused them of deceiving investors about the quality of the bonds they sold.

But no high-level Wall Street executives had been sent to jail over charges related to the financial crisis. And the banks in all the SEC cases were allowed to neither admit nor deny wrongdoing — a practice that brought criticism of the agency from judges and investor advocates. That has triggered public outrage. Some lawmakers and other critics demanded that the big bailed-out banks and senior executives be held accountable.

JPMorgan has enjoyed a reputation for managing risk better than its Wall Street competitors. The bank came through the financial crisis in better shape than most of its rivals.

But in recent months, it has been engaged in a number of embarrassing and costly settlements.

In September, JPMorgan agreed to pay $920 million and admit it failed to oversee trading that led to a $6 billion loss last year in its London operation. That combined amount, in settlements with three regulators in the U.S. and one in Britain, is one of the largest fines ever levied against a financial institution.

In another case, the company agreed to pay a $100 million penalty and admitted that its traders acted “recklessly” with the London trades.

And in a first for a major company, JPMorgan admitted in the agreement with the SEC over the trading loss in London that it failed in its oversight.