A Disney Channel actor was fired after he was arrested in Utah for allegedly attempting to meet up with a person he believed to be a 13-year-old for sex, a company representative said.

Stoney Westmoreland, 48, who plays the main character's grandfather in the Disney Channel show "Andi Mack," was arrested last week and charged with enticing a minor by internet along with other counts involving disseminating harmful materials.

Westmoreland used an app that lets people meet others for dating and having sex to chat with a person he believed to be 13, according to a probable cause affidavit filed in the Salt Lake County Court.

The affidavit said Westmoreland used the app to ask the person he thought was a minor to meet up for sex. He also asked the person for nude photos and sent pornographic photos, including pictures of "males engaging in anal sex," the affidavit said.

Stoney Westmoreland was arrested after allegedly arranging online to have sex with someone he believed was 13 years old in Utah. Salt Lake County Sheriff's Office

When Westmoreland arrived at the place he believed he was going to pick up the 13-year-old, he was met by police and the FBI Child Exploitation Task Force and arrested, according to the affidavit.

A Disney Channel spokesperson said Westmoreland would no longer be acting on "Andi Mack."

"Given the nature of the charges and our responsibility for the welfare of employed minors, we have released him from his recurring role and he will not be returning to work on the series which wraps production on its third season next week," the spokesperson said.

Westmoreland has appeared in 38 episodes of "Andi Mack," a show about a teen who learns that the person whom she believes to be her sister is actually her mother and the people she thought were her parents are her grandparents. The show films at a junior high school in Salt Lake City, according to NBC affiliate KSL.

Westmoreland has been a TV actor since 1996, according to his IMDB profile, and has also appeared on shows like "Better Call Saul," "Scandal" and "Breaking Bad."