A Cobb County man stole more than $500,000 from a victim in a scam that went on for five years, prosecutors said.

Wesley Ryan Gayton, 35, of Kennesaw, pleaded guilty Thursday in Cobb County Superior Court to elder exploitation and theft, according to a media release from the Cobb County District Attorney’s Office.

Gayton used the ruse that his father was ill and needed the money for treatment and medicine. Also, he convinced his victim to pawn vehicle titles and firearms, prosecutors said. The theft ran from 2010 to 2015.

He was sentenced to 25 years in prison, with two years in custody and the remainder to be on probation. Also, Gayton must pay $591,578.32 in restitution to the victim. Gayton has been in custody since his arrest in January 2015.