UPDATED: Drake Bell has been sentenced to two years’ probation and 200 hours of community service after pleading guilty to charges of attempted child endangerment and disseminating matter harmful to juveniles.

After initially pleading not guilty, the “Drake & Josh” star later pleaded guilty to a felony and misdemeanor charge relating to a 2017 incident with an underage girl who met him online and attended one of his concerts in Ohio when she was 15. Police said the meeting followed months of social media messages that were “at times … sexual in nature.”

In 2018, the victim reported Bell to Toronto police. They forwarded their findings to Cleveland police, who arrested Bell on June 3. After pleading not guilty, Bell was freed on a $2,500 personal bond ordering him to have no contact with the victim.

Bell, a resident of West Hollywood, will complete his 200 hours of community service in California. He faced up to two years in prison.

In 2015, Bell was arrested for a DUI with bail set at $20,000. In that case, he pleaded no contest to a misdemeanor and spent four days in jail.

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.

Variety asked Peck about Bell’s sentence at the premiere of “Turner and Hooch” on Thursday, and he said, “It’s upsetting, and it’s an unfortunate situation. It’s disappointing.”

Bell performed the show’s opening theme song, “I Found a Way,” and has released several albums throughout his career, including 2005’s “Telegraph,” 2006’s “It’s Only Time,” 2014’s “Ready Steady Go!” and 2020’s “Sesiones En Casa.”