"Dance Moms" star Maddie Ziegler didn't audition for her sequence on the hit ABC Family series "Pretty Little Liars."mDuring the first half of season 6, Ziegler did a creepy dance number as part of Spencer Hastings' (Troian Bellisario) imagination.

In an interview with Entertainment Weekly, executive producer Oliver Goldstick explained how Ziegler ended up on the drama/mystery show.

"Maddie is represented by the same agency that I am. They called me last year toward the end of the season and said, 'Can you put Maddie in it? Maddie's a huge fan of the show,'" he said.

However, Ziegler wasn't included in Season 5 because Shay Mitchell and Ashley Benson also had a remarkable dance number that time.

"I didn't believe that with three episodes left in the season I could ask for another dance sequence without them saying, 'Oliver, this is not 'Glee.' You can't keep doing this to us,'" he said.

At that time, Goldstick told Ziegler's reps to be patient because he knew that once the opportunity kicks in, he will personally reach out to them again.

"After the dollhouse in the last finale I thought, okay, we're already in a place where we don't know who was in that bunker besides our girls, so the idea was we would find a way to create, at least if not a legitimate sequence, a fantasy sequence," he explained.

From there, Ziegler rehearsed for six hours to master her routine, and she filmed her scene.

In other news, Ziegler will also appear in the upcoming sixth season of "Dance Moms." Just recently, the 13-year-old "Chandelier" dancer filmed episode 9 for the hit Lifetime reality TV show. Ziegler also teamed up with Brynn Rumfallo for a lyrical dance routine at the Fierce competition in California on Saturday, Dec. 12, according to the show's spoiler site.

"Dance Moms" Season 6 will air on Jan. 5, 2016 at 8 p.m. ET.