Updated

A Spanish YouTube star who pranked a homeless man by filling an Oreo cookie with toothpaste was sentenced on Friday to 15 months in prison and now owes $22,300 to his victim, The New York Times reported Sunday.

A Barcelona judge also ordered that Kanguhua Ren's YouTube and other social media accounts be shut down for five years. The 20-year-old Ren, who goes by ReSet on the video-sharing website, was born in China but has lived in Barcelona for most of his life. He is unlikely to serve any jail time because Spanish law typically waives prison sentences for first-time offenders who commit non-violent crimes.

YOUTUBE STAR FACES PRISON TIME AFTER FEEDING HOMELESS MAN OREO WITH TOOTHPASTE AS CRUEL PRANK

Kanguhua Ren, former YouTube star, was sentenced on Friday to 15-months in prison, owes $22,300 to his victim, and is banned from the channel and all other social media platforms for 5 years after pranking a homeless man with an Oreo cookie filled with toothpaste. (YouTube) (YouTube)

Ren posted a since-deleted video to his YouTube channel in January 2017 in which he is seen filling Oreo cookies with toothpaste and repackaging them as a prank to impress his 1.2 million followers. The prank took a turn for the worse when he handed the cookie, along with 20 euros, to a homeless man identified as Gheorge L., who proceeded to eat them and vomit afterward.

In the video, Ren can be heard contemplating whether he has gone too far with the prank.

"But look at the positive side; this will help him clean his teeth,” he said. “I think he hasn't cleaned them since he became poor."

YOUTUBE STAR ROMAN ATWOOD SAYS HIS MOTHER DIED AFTER FALL OFF SCOOTER

The Barcelona court didn't see the humor and found Ren guilty of violating the moral integrity of the homeless man.

Gheorge L., a native of Romania who fled his country to escape the Communist dictatorship and was later hospitalized in a mental institution said he had “never been treated so poorly while living on the street,” according to a report by the El Pais newspaper.

After the video received negative feedback from his followers, Ren attempted to make amends by filming a subsequent video where he visits the homeless man again and offers him 20 more euros. Ren made a third visit after that, offering the man's daughter 300 euros to prevent her from filing a lawsuit, according to Spanish police.

CLICK HERE FOR THE FOX NEWS APP

The YouTuber raked in $2,475 from advertisers for the Oreo prank videos alone, a fact that judge Rosa Aragonés said showed "this was not an isolated act," as he has posted other videos displaying "cruel behaviors" towards "easy or vulnerable victims," in the past.

Ren defended his videos to the court saying “I do things to mount a show: People like what is morbid.”

Click for more from The New York Times.