Hello,Customer and welcome to Just Answer.
Yes, unfortunately, if your contract contains the prepayment penalty clause, it is indeed legal.
However, please look at your documents very carefully. There is usually a time period to which the prepayment penalty applies. It may be only 2 years (which is often the time specified) or another relatively short period of time . . . occasionally one year. If the time period is only a year in your contract, it might be worth your while to wait until the time has passed. Then you will not have to pay a prepayment penalty. It may even be worth it to wait two or more year, as the $9000 prepayment penalty is rather stiff. You can make some calculations to see how much interest you will save with a new mortgage versus the $9000 you will have to pay, and see which way helps you come out better.
Also, something else to consider is that if you refinance with the same lender, they will often waive the prepayment penalty. Some (not many) will even lower your current interest rate on your current loan in order to keep you as a loan customer. Others will lower your current interest rate for a fee, and that fee varies but often is fairly reasonable in light of the interest savings in over the long-term.
I hope this answers your question, and if you are happy with my response please click ACCEPT. I want you to be 100% pleased with my answer, so if you need more information please let me know.
Thank you for trusting your question to Just Answer!