A Philadelphia homeless man who conspired with a New Jersey couple to create a GoFundMe scheme that raised more than $400,000 was sentenced Friday to five years of probation and agreed to enter a drug treatment program.

Thirty-six-year-old Johnny Bobbitt Jr. pleaded guilty in March to conspiracy to commit theft by deception charges, admitting to helping Kate McClure and her boyfriend Mark D'Amico in their GoFundMe scam in November 2017, NBC News reported.

'MODERN FAMILY' STAR CALLS OUT 'HATE TWEETS' OVER SHARING GOFUNDME POST

Prosecutors said Bobbitt, a veteran who was homeless at the time, posed with McClure, who posted a fake story to GoFundMe in which she said she was raising money for Bobbitt after he generously gave her his last $20 when her car ran out of gas on the highway.

As part of a plea deal, Bobbitt will be sent to an inpatient rehabilitation center before his release and agreed to testify against McClure and D’Amico in the future. A New Jersey judge said Bobbitt will serve five years in state prison if he violates probation.

About 14,000 people donated almost $403,000 to the GoFundMe page, falling for the story. Bobbitt, who was homeless at the time, exposed the couple’s fraud when he filed a lawsuit against McClure and D’Amico in August, arguing they withheld funds and never cut him in on the deal.

McClure and D’Amico accused the homeless man of spending the GoFundMe money on family, drugs, a truck and a trailer. Federal authorities investigated the case, and prosecutors said the couple was experiencing financial troubles at the time and used the GoFundMe account as a scam.

CLICK HERE FOR THE FOX NEWS APP

McClure pleaded guilty to federal charges of conspiring to commit wire fraud and will serve a 20-year prison sentence. D’Amico also faces state-level theft and conspiracy charges.