Drake Bell, who starred as Drake on the hit Nickelodeon series “Drake & Josh,” pleaded guilty on Wednesday to a felony charge of attempting to endanger children and a misdemeanor charge of disseminating matter harmful to juveniles.

Bell, who appeared virtually via Zoom at the pretrial hearing in Cuyahoga County Common Pleas Court, could face up to 18 months in prison and a $5,000 fine for the felony charge, and up to six months in county jail and a $1,000 fine for the misdemeanor.

The actor and singer faces three years of “post-release control” following the possible prison term. Sentencing was set for July 12.

The charges stem from an incident that took place between a then-31-year-old Bell and a 15-year-old girl on Dec. 1, 2017 — the same day Bell was scheduled to perform at Cleveland club The Odeon. While police have not specified what exactly occurred at the venue, they say the meeting followed months of social media messages that were “at times … sexual in nature.”

The victim later filed a police report in Canada, and Canadian authorities reportedly then contacted Cleveland police. She may provide the court with a victim impact statement prior to Bell’s sentencing.

On June 3, Cleveland Police arrested Bell, who then pleaded not guilty in Cuyahoga County Court. He was freed on a $2,500 personal bond ordering him to have no contact with the victim.

Debuting in 2004 and running for four seasons, “Drake & Josh” followed stepbrothers Drake Parker (Bell) and Josh Nichols (Josh Peck). The series spawned two TV movies and was one of Nickelodeon’s highest-rated programs, averaging about 3 million viewers at the time.