Stoney Westmoreland, who stars as the grandfather in the popular Disney Channel series Andi Mack, has been arrested for trying to lure a 13-year-old in for sex

A 48-year-old actor who portrayed the grandfather of a middle school girl in a popular Disney Channel series was arrested Thursday for attempting to lure a minor in for sex.

Stoney Westmoreland, who stars in Andi Mack, began communicating with the 13-year-old he matched with on a dating app commonly used for arranging hookups, according to a police affidavit.

The affidavit states that the middle-aged man requested naked photos from the teen.

He also sent the victim pornographic images in return.

Westmoreland later attempted to meet the victim for sex through a ride-sharing app he used to order the victim a car.

That's when he was taken into custody by the Salt Lake City Police Department and FBI Child Exploitation Task Force.

He has been charged with four counts of dealing in materials harmful to a minor and one count of enticing a minor by internet or text.

Further investigation is currently underway.

Westmoreland is seen starring in the American comedy series next to main character, Andi Mack, played by Peyton Elizabeth Lee

The series follows 13-year-old Andi Mack and her friends around their middle school

Westmoreland has also starred in the TV series Scandal, NCIS: Los Angeles, Weeds and Gilmore Girls, to name a few.

The American comedy series, Andi Mack, first aired on the Disney Channel in April 2017 and is currently still running.

The series, which has positive viewer ratings on IMDb and Google, takes viewers into the everyday life and drama of 13-year-old Mack, played by Peyton Elizabeth Lee.

Disney cable network announced late Friday that Westmoreland has been fired.

'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,' a representative said.

Andi Mack cast photo is seen. Westmoreland, pictured far right, was arrested Thursday