A California man will spend more than the next eight years in prison after pleading guilty to charges that he defrauded more than 500 distressed homeowners out of $2.2 million by promising that he could help them avoid foreclosure.

According to the U.S. Attorney’s Office for the Central District of California, Kevin Rasher pleaded guilty in May to 12 counts of mail fraud. On Monday, Rasher received a sentence of 97 months in prison.

Court documents show Rasher admitted that, between 2011 and 2016, he told distressed borrowers he was either an employee of the Department of Housing and Urban Development or a lawyer in furtherance of his scheme.

Under the guise of being a HUD employee or a lawyer, Rasher falsely told the struggling borrowers that they had been approved for a reduced mortgage payment or interest rate.

Court documents show that Rasher would then tell the borrowers to mail their mortgage payments to one of his businesses, instead of to their lender. Rasher allegedly told the borrowers that he would forward the money to the homeowners’ lenders on their behalf.

But, instead of forwarding the money to the lenders, Rasher deposited the money into his personal bank accounts and used it to pay his own expenses.

According to the U.S. Attorney’s Office, Rasher admitted that he fraudulently obtained approximately $2.24 million from more than 500 victims through the scheme.

In addition to receiving a 97-month sentence, Rasher was also ordered to pay $2.24 million in restitution to his victims.