WASHINGTON (CNNMoney) -- Final details were filed in federal court Monday in the $26 billion settlement to help struggling homeowners and settle charges against big banks of abusive and negligent foreclosure practices.

The deal finalizes the big Obama administration announcement, made more than a month ago, that banks would provide relief to homeowners who owe more than their homes are worth or are victims of improper foreclosures. The relief would come in the form of principal reductions, mortgage refinancings and small payouts.

But until Monday, the only details made public have been what officials have said, as well as a few short summaries and fact sheets.

"The unprecedented joint agreement is the largest federal-state civil settlement ever obtained," according to a Department of Justice statement.

The deal, if it obtains final judicial approval, would settle charges of improper foreclosure practices dating back to 2008. The banks committed $26 billion to help homeowners with loans exceeding their home's value -- known as being "underwater" -- and to compensate those who lost their homes. The banks also agreed to change the way they handle and approve foreclosures.

The deal had been in the works for 16 months.

During the announcement, officials touted that up to 1 million homeowners could see their principal reduced by an average $20,000, while another 750,000 could be able to refinance loans.

Last week, Bank of America confirmed that some 200,000 of its borrowers who qualify for help would, on average, get $100,000 in relief. That news means other borrowers at other banks will see much lower writedowns.

Payments up to $2,000 will be made to those who lost their homes to foreclosure over the past three years. The details also set forth tougher servicing standards by which the banks must abide.

The court records also make clear some facts omitted during the original announcement. For example, banks won a concession concerning second mortgages, which would be written down equally with first mortgages under the settlement.

Banks' reticence to write down second liens played a role in stumping progress of Obama administration housing relief efforts. Usually in a foreclosure, second mortgages or second liens are losses borne entirely by the banks. Banks tend to own second liens, which accompany about half of all mortgages at risk for foreclosure, according to a 2010 Treasury report.

Critics, including author of the Naked Capitalism blog Yves Smith, have said the equal treatment of the liens will benefit banks over investors, who tend to own first mortgages.

Department of Housing and Urban Development Secretary Shaun Donovan said two weeks ago that the delay had been due to minor negotiations with some states about such issues as how they planned to use their piece of the settlement.

Online Public Information File

Viewers with disabilities can get assistance accessing this station's FCC Public Inspection File by contacting the station with the information listed below. Questions or concerns relating to the accessibility of the FCC's online public file system should be directed to the FCC at 888-225-5322, 888-835-5322 (TTY), or fccinfo@fcc.gov.