WASHINGTON — The Justice Department and JPMorgan Chase & Co. have reached agreement on all issues in a $13 billion settlement of a civil inquiry into the company’s sales of low-quality mortgage-backed securities that collapsed in value in the financial crisis, a person close to the talks said late Monday.

The person said the documents spelling out the agreement could be signed as early as Tuesday.

The person spoke on condition of anonymity because the settlement has yet to be finalized.

Another person familiar with the talks said the two sides were “very close” to a final agreement.

The deal is the largest ever reached between the government and a corporation. It eclipses the record $4 billion levied on oil giant BP in January in the worst offshore oil spill in U.S. history.

The nation’s biggest bank will pay more than $6 billion to compensate investors, pay $4 billion to help struggling homeowners and pay the remainder as a fine.

The final issue revolved around the $4 billion to compensate consumers. According to the first person close to the talks, some $1.5 billion will be a write-down to reduce the principal of homeowner loans, $300 million will enable homeowners to pay less now on their mortgages and the remainder of the $4 billion will go toward reducing mortgage interest rates, originating new loans and helping revive blighted properties. An independent monitor will be appointed to oversee the assistance to homeowners.

 

The deal is the latest chapter in the burst of the housing bubble in 2007 when bundles of mortgages sold by JPMorgan and other financial institutions left investors with billions of dollars in losses.

 

JPMorgan has said that most of its mortgage-backed securities came from Bear Stearns Cos. and Washington Mutual Inc., troubled companies that JPMorgan acquired in 2008.

 

Still to come is a decision on whether the Justice Department will file criminal charges against JPMorgan. An investigation is under way by the U.S. Attorney’s office in Sacramento, Calif.