A YouTuber notorious for his viral pranks has been sentenced to prison after one prank drew major criticism from the Internet.

»RELATED: YouTuber Jake Paul stirs up trouble at amusement park, report says

Kanghua Ren, who amassed YouTube fame under the username ReSet, has been sentenced to 15 months in prison and fined approximately $22,000 by a Spanish court after a video documenting himself filling Oreos with toothpaste and giving them to a homeless man went viral in 2017, reports  Spanish newspaper El País.

Ren was found guilty of damaging the stranger's moral integrity and was also banned from YouTube for five years as part of his sentencing. He had over 1 million subscribers and is especially popular in Spain for his videos, which often garner up to hundreds of thousands of views.

CHICAGO, IL - DECEMBER 27:  In this photo illustration, milk and cookies sit on a counter on December 27, 2012 in Chicago, Illinois. Milk prices could spike to $6 to $8 a gallon in January if lawmakers fail to reach a "fiscal cliff" deal and renew a Farm Bill that's been in place since 2008 and sets the price at which the government buys milk.  (Photo Illustration by Scott Olson/Getty Images)

Credit: Scott Olson

icon to expand image

Credit: Scott Olson

"This was not an isolated act," said judge Rosa Aragonés in her ruling, according to  El País. She went on to describe the video as a "clear and unambiguous act of humiliating content."

In the video, filmed as a challenge requested by one of his subscribers, he gives the toothpaste-filled Oreos to a homeless man along with a 20 euro bill, around $22. The homeless man vomited after consuming the Oreos.

"This will help clean his teeth," he said at the end of the video, which he has since deleted. "I don't think he has cleaned them since he became poor."

He then replaced the controversial video with another one where he offered the same man another 20 euro bill. Spanish police also report that Ren had offered the homeless man's daughter around $330 in exchange for not filing charges against him.

After the ruling was announced, Ren published a brief statement             on YouTube Sunday promising a full-length response to the rulings later this week.

"Do not believe everything the newspapers say," he wrote in the statement. "They're not completely wrong but they make things up to make people (in this case, me) look bad."