The biggest mystery of "Pretty Little Liars" – A's identity – was solved in the midseason finale of the show that was aired on Tuesday.

Spoilers:

Charles -- Jason and Alison's brother -- transitioned into CeCe and became friends with his siblings so that he could spend more time with Alison.

Charles was sent to Radley when Mr DiLaurentis saw him giving Alison a bath to stop her crying and accidentally dropping her in the bathtub. Mr DiLaurentis was already displeased with the fact that his son wanted to be a girl, and this further helped him to stick to his decision to send Charles to Radley.

And Charles became CeCe and then A, only when he thought someone was hurting his little sister. This, CeCe explained, was why she wanted to hurt the Liars as well.

"I only got mad when you didn't listen!" CeCe tells Ali in the summer finale, before turning to the camera: "I know you won't believe me, but I love all of my dolls. That's why you're still alive."

Although A's identity has been revealed, the show ended with a twist that saw the girls teasing the arrival of yet another dangerous person.

It's after the time-jump and the girls are seen rushing towards Ali saying, "He's coming for you!"

"We came back here for you, Ali, so move it!"

"It's too late. He's already here," says Spencer, and season 6 comes to an end.

So what's in store for the girls after the time-jump? "A lot! There's a lot of great stuff," executive producer Marlene King told ET. "We're kind of finding out together who these girls are five years later. We knew where they were going to go to school, we knew where they were going to be in their personal lives but as we bring them back to Rosewood, there's an even that happens that brings them all back together. It's just kind of fun exploring who they are they and they're having fun exploring their characters too."

As for the big A reveal, King said she hopes fans are satisfied with the answer.

"Pretty Little Liars" season 6B will premiere in January 2016.