More than five years after the mortgage crisis hit, there are still millions of homeowners who are struggling to stay in their homes. Foreclosures have dropped considerably, but are still popping on the market a lot more than they should.

If you're still struggling to make your housing payments, you may be able to get some relief. Mortgages are still being modified by Fannie Mae (FNMA 1.51%) and Freddie Mac (FMCC 1.63%) to make the payments more affordable to homeowners and to prevent your home from becoming a foreclosure.

Flickr / Mark Moz.

In fact, during the first quarter, the agencies modified nearly 55,000 home loans, just 9% less than during the same quarter in 2012. So, the lingering effects of the mortgage crisis are still alive and well. There are four main ways to change your home's financing and avoid foreclosure, so here is what can possibly be done and how to qualify for one of these options.

Refinancing
If your loan is owned by Fannie Mae or Freddie Mac, you may be able to refinance your loan, even if you have little or no equity.

This has a double benefit of allowing borrowers to take advantage of the current low interest rates, and also starts the loan period over. In other words, let's say you owe $250,000 on your home and are paying 7% interest with 22 years left on the loan. This would translate to a monthly payment of about $1,860.

Under the government's HARP program, you could refinance this at a lower rate; say 4.5% over 30 years, lowering your monthly obligation to a much more manageable $1,265. There are shorter-term options available, which may be worth a look if your budget allows a slightly higher payment.

In order to qualify for a HARP refinancing, you must have a good payment history for the past 12 months, and have a loan-to-value ratio of 80% or more. Not everyone qualifies for this, so one of the other options may be more suited to you if you're really struggling to stay afloat.

Repayment plans
This is an option for those who temporarily fell behind on a Fannie or Freddie-owned mortgage, but now could afford to start making payments again.

If you are several months behind on your payment, and don't qualify (or don't want) to refinance, a repayment plan could allow you to add your past-due amount to your mortgage payment, and spread the extra amount over a few months.

If you are five months behind on your $2,000 per month mortgage payments, adding $1,000 per month for the next ten months might be easier than coming up with $10,000 all at one to bring your loan current.

Modification
If you are behind on your mortgage payments, or think you may fall behind soon, a mortgage modification may be the best solution.

A modification is basically an agreement between you and your mortgage company that changes the original terms of the mortgage. This could mean a lower interest rate, longer term, or changing the type of loan.

The government's modification program is known as HAMP (Home Affordable Modification Program) and can modify your loan payment to be no more than 31% of your monthly pre-tax income. For example, a 30-year loan could be stretched to 40 years. An adjustable rate can become a lower fixed rate.

Forbearance
A forbearance might be a good option if your difficulty in making your mortgage payments is likely to be temporary. For instance, if you lose your job, have unexpected expenses, or have other short-term financial problems.

Under the terms of forbearance, your monthly payments are temporarily reduced or suspended for a set amount of time. After the forbearance is over, you'll need to make up the missed payments, either by spreading them out over future payments or extending the loan by a time period equal to that of the forbearance.

How to get started
First, check to see if your loan is owned by Fannie or Freddie by using the lookup tools on the agencies' websites.

Then, look over the qualifications for the solution you think would be best for you and proceed from there. Both Fannie and Freddie can connect you with companies that will help you refinance or modify your loan, so take advantage of the information offered to you.

Bear in mind that all of these options other than refinancing will likely have a negative impact on your credit score. However, it won't hurt nearly as much as a foreclosure, and may be worth the temporary credit sting to make your mortgage affordable.