If you’re struggling to make your monthly mortgage payment, Fannie Mae and Freddie Mac have a new loan modification program so your home stays out of foreclosure — and you stay put.

The program, called Flex Modification, goes into effect Oct. 1, 2017. It will incorporate key elements from Fannie’s and Freddie’s standard and streamlined modification programs, as well as their expired Home Affordable Modification Program.

Here’s a closer look at how Flex Modification works and who’s eligible.

» MORE: Compare online mortgage refinance lenders

Created under the direction of the Federal Housing Finance Agency, Flex Modification fills the need for a long-term foreclosure-prevention solution now that HAMP has expired. A loan modification is when a lender agrees to change the original terms of your mortgage — often by extending the loan term or reducing the principal balance or interest rate — to lower your monthly payments.

The program is called “Flex Modification” because it offers lenders greater flexibility in evaluating borrowers compared with previous loan modification programs. With HAMP, lenders could adjust the terms of a qualified loan until a mortgage payment equaled 31% of the borrower’s income. The Flex Modification program applies those same measures, but it allows lenders to also consider how many days delinquent borrowers are and the value of their home. It aims to reduce monthly mortgage payments by 20% for eligible borrowers.

A modified loan benefits both lenders and borrowers: It’s usually less expensive and time-consuming than a foreclosure.

Here are the criteria to be approved for a Flex Modification:

Fannie Mae and Freddie Mac will begin taking applications Oct. 1, but you’ll first need to check if your mortgage is owned or guaranteed by one of the agencies. Ask your lender, or use the online loan look-up tools (click here for Fannie and here for Freddie).

Once you’ve confirmed that, you’ll need to submit a complete Borrower Response Package, which includes:

Your lender or servicer should provide you with this paperwork.

If you’re more than 90 days behind on your mortgage, Fannie Mae and Freddie Mac consider your loan to be in severe risk of foreclosure. That’s the end result Flex Modification aims to avoid.

In those instances, there’s a streamlined version of Flex Modification that doesn’t require the documentation package or income verification. The goal of the program is also a 20% payment reduction.

It takes teamwork to modify your mortgage loan if you’re struggling to make payments. Reach out to your mortgage servicer — either the original lender, or the new one if your loan was resold — as soon as possible.

Deborah Kearns is a staff writer at NerdWallet, a personal finance website. Email: dkearns@nerdwallet.com. Twitter: @debbie_kearns.

The article New Loan Modification From Fannie, Freddie: What to Know originally appeared on NerdWallet.