WASHINGTON (CNNMoney) -- In the largest deal to date aimed at addressing the housing meltdown, federal and state officials on Thursday announced a $26 billion foreclosure settlement with five of the largest home lenders.

The deal settles potential state charges about allegations of improper foreclosures based on robosigning, seizures made without proper paperwork.

The settlement includes the Justice Department and the U.S. Department of Housing and Urban Development, as well as 49 state attorneys general -- all but Oklahoma.

"We are using this opportunity to fix a broken system," said U.S. Attorney General Eric Holder at the news conference announcing the settlement.

The settlement sets up a federal monitor to oversee the process and try to prevent roadblocks and red tape that tripped many homeowners seeking help in earlier programs designed to address the housing crisis.

President Obama said the settlement will "begin to turn the page on an era of recklessness that has left so much damage in its wake."

"No action, no matter how meaningful, is going to by itself entirely heal the housing market," he said in separate remarks. "But this settlement is a start."

Most of the relief will go to those who owe far more than their homes are worth, known as being underwater on the loans. That relief will come over the course of the next three years, with the banks having incentives to provide most of the relief in the next 12 months.

"This settlement is about homeowners, homeowners in distress," said Iowa Attorney General Tom Miller at the news conference with state and federal officials.

Principal reduction: At least $17 billion will go to reducing the principal owed by homeowners who are both underwater and behind on their mortgages.

The agreement calls for principal reduction for as many as 1 million people. But it's unlikely the money will go that far, because many people need more than the $17,000 average reduction that would result if the money is split among 1 million homeowners.

At the same time, total principal reduction could go higher -- to as much as $34 billion -- since the agreement requires deeper principal reductions for the most troubled loans.

Refinancing: Officials say up to 750,000 other underwater homeowners who are current on their mortgages will be able to refinance their current loans at lower rates. They will not receive a reduction in principal, but with mortgage rates now near record lows, they could receive substantial savings on their monthly payments.

The settlement sets aside $3 billion to account for the reduced interest payments the banks will receive after the refinancing.

Robosigning payments: About $1.5 billion of the settlement will go to homeowners who had their homes foreclosed upon between Jan. 1, 2008 and Dec. 31, 2011, and who meet other criteria. They will receive up to $2,000 each.

Accepting that payment does not preclude homeowners who lost their home in an improper foreclosure from suing the bank to recover damages, Donovan said.

Participating banks: The five mortgage servicers that are parties to the settlement -- Bank of America (BAC, Fortune 500), JPMorgan Chase (JPM, Fortune 500), Citigroup (C, Fortune 500), Wells Fargo (WFC, Fortune 500) and Ally Financial -- will pay a total of $5 billion to the states and federal government. Some of that money will go to foreclosed homeowners and the rest to the states.

Federal officials say negotiations are underway to expand the settlement to nine other major servicers, which would raise the overall value of the settlement to $30 billion.

Related settlements: The deal spurred pacts between the authorities and banks in similar cases.

Oklahoma Attorney General Scott Pruitt announced a separate $18.6 million settlement that addressed homeowners whose homes were foreclosed through improper means, but did not provide help to those whose mortgages were underwater. He said he believes the broader agreement "overreached" the authority of both federal and state governments.

"We had concerns that what started as an effort to correct specific practices harmful to consumers, morphed into an attempt by President Obama to ... fundamentally restructure the mortgage industry in the United States," Pruitt said.

The Federal Reserve said it had reached an agreement with the five banks to pay $766.5 million in sanctions related to their servicing practices.

And Loretta Lynch, the U.S. Attorney in Brooklyn, N.Y., announced a $1 billion settlement with Bank of America to resolve claims of underwriting and mortgage origination fraud by BofA and mortgage lender Countrywide Financial, which BofA bought in 2008.

The bigger foreclosure problem: The $26 billion deal announced Thursday is the second biggest settlement ever involving states. It trails only the $206 billion pact in 1998 with the tobacco industry.

And it dwarfs any settlements that major Wall Street firms have reached to resolve other allegations of misdeeds related to the financial markets meltdown and the Great Recession.

Still it only will help a faction of those homeowners who are struggling with mortgages. The relief would not be available to those homeowners whose mortgages have been sold to the government-sponsored mortgage guarantors Fannie Mae and Freddie Mac.

There are 1.5 million homeowners who are 90 days or more delinquent on their mortgages but not yet in foreclosure, according to the most recent estimate from the Mortgage Bankers Association. An additional 1.9 million are in the foreclosure process. And CoreLogic estimates that 11 million homeowners are underwater on their mortgages.

The settlement does not preclude criminal prosecutions from being pursued. It also doesn't stop investigations into other allegations of misdoings, such as the process of bundling loans into mortgage-backed securities and selling them to investors.

"It wasn't the servicing practices that created the bubble nor caused the collapse," said Donovan. "It was the origination and the securitization of these horrendous products. We will be aggressive about going after those claims."

The deal is supposed to protect consumers when it comes to robosigning, and ensure that mortgage servicers agree to communicate better, avoid delays and give homeowners who are late on mortgage payments a fairer shake.

New York's participation had been shaky this week, because some of the banks involved in the multi-state deal had also been sued by Attorney General Eric Schneiderman last week. Those banks -- Bank of America, Wells Fargo and JPMorgan Chase -- had also asked for a legal pass from Schneiderman's lawsuit, which accuses them of deceptive foreclosure practices for relying on the Mortgage Electronic Registration System.

On Tuesday, Schneiderman's office organized a media briefing to talk about the deal and then canceled it minutes before it was supposed to begin.

The big question throughout the negotiations was how much money would be available to help homeowners, which depended on how many states agreed to the deal. California's participation raises the total settlement value by several billion dollars.

At least one consumer advocacy group, the Center for Responsible Lending, has said the deal -- while "no silver bullet" -- leaves room to hold banks accountable in other mortgage probes, said Kathleen Day, a spokeswoman for the nonprofit.

But other left-leaning groups, including Move On and the New Bottom Line, are continuing to urge states to hold out for a big criminal investigation and a $300 billion settlement award.

--CNN's Jessica Yellin contributed to this story.