Drake Bell from Nickelodeon's "Drake and Josh" pleaded guilty to attempted child endangerment, a crime that the actor allegedly committed in Cleveland in 2017. 

KIRO 7 reported that the verdict was served on Wednesday, June 23. The Nickelodeon star pleaded guilty to a felony charge of attempting to endanger children as well as a misdemeanor charge of disseminating matter harmful to juveniles.

Judge Timothy McCormick presided over the court hearing that happened at a conference meeting via Zoom.

READ NEXT: Jersey Shore Star Ronnie Ortiz-Magro's Ex Jenn Harley Arrested for Assault With a Deadly Weapon

Nickelodeon's 'Drake and Josh' Star Pleads Guilty

According to McCormick, there was a plea agreement that Drake Bell would plead guilty to both of the charges.

Because of the deal, the judge said the consequences will include six to 18 months imprisonment and fines up to $5,000 for pleading guilty to attempted child endangerment. Meanwhile, the second charge would imprison the actor for up to six months and a fine up to $1,000, according to a report from People.

When asked by the judge if the actor understood the potential penalties, Drake Bell answered, "I do Your Honor, Yes."

However, the judge noted that after Bell's release, he would undergo three years of post-release control that may restrict his activities. The judge confirmed that Drake Bell would go back inside the jail if he would violate the restrictions. Details on the restrictions were not furthered.

Despite Bell's decision of pleading guilty to the charges, the lawyer of the "Drake and Josh" star did not reveal the reason behind the defendant's decision.

Ian Friedman, Drake Bell's lawyer, noted that questions about Bell's decision in entering his plea would be answered.

"All questions about this case will be answered at sentencing," said Friedman. The Nickelodeon star pleaded not guilty to the charges earlier this month.

Cuyahoga County spokesperson, Tyler Sinclair, confirmed that the case Bell faced involved a then 15-year-old who contacted the Toronto Police in 2018. The spokesperson underscored that Drake Bell "violated his duty of care" and created a risk of harm to the victim.

Authorities from Toronto contacted the Cleveland police, which prompted the investigation on the "Drake and Josh" star.

Drake Bell was scheduled to be sentenced on July 12. The judge said the victim will be given a chance to read a "victim statement" if she wanted to on the same day of Bell's sentencing.

Drake Bell's Encounter With the Victim

People reported that the charges filed against Drake Bell stemmed out in 2017 when the Nickelodeon actor performed in Cleveland. Sinclair noted that several years before the concert or performance, the then 15-year-old developed a relationship with the actor online.

The Cuyahoga County spokesperson alleged Bell of making the teenager send "inappropriate social media messages."

Apart from the charges Drake Bell faced, the actor's ex-girlfriend also accused him of physical and verbal abuse. However, Bell denied his ex-girlfriend's accusation in a statement.

Before pleading guilty for his misconducts, Drake Bell appeared on all the 56 episodes of Nickelodeon's "Drake and Josh" that aired from 2004 to 2007. He also starred in two "Drake and Josh" movies and "The Amanda Show."

READ MORE: Michael B. Jordan Agrees to Rename His New J'Ouvert Rum After Accusations That the Name Appropriated Caribbean Culture

WATCH: Former Nickelodeon Star Drake Bell Pleads Guilty to Charges Involving 15-year-old Girl - From WKYC Channel 3