“Pretty Little Liars” has set records in terms of episodic TV and social media — with each episode becoming an event on Twitter and other sites as fans share their passion for the series. (ABC FAMILY)

“Pretty Little Liars” has set records in terms of episodic TV and social media — with each episode becoming an event on Twitter and other sites as fans share their passion for the series. (ABC FAMILY)

According to ABC Family, the third-season finale of “Pretty Little Liars,” which aired in March, was the top show on all of television that night for females 12-34 — and tops in cable with women 18-34 and 18-49.

The show returns for its fourth season Tuesday at 8 p.m., and its creators are acutely aware of the pressure of writing a show with such huge fan-love — and, therefore, huge expectations.

“There are videos where fans record themselves watching season finales, then post them on YouTube,” says “PLL” executive producer Joe Dougherty, who recalls the moment in one such video when it was revealed that two characters on the popular teen mystery were, surprisingly, working together.

“The girls who were watching literally fell off their bed — fell out of frame. There’s a girl watching TV, and she’s tweeting, and she just stops dead in the tweet, her thumb just poised over the machine. That one jumps out at me, because it was such a big moment [for the show].

“We worked so hard at keeping it secret, and we managed to pull it off.”

For the uninitiated, “Pretty Little Liars” focuses on high school girls Spencer (Troian Bellisario), Hanna (Ashley Benson), Emily (Shay Mitchell), and Aria (Lucy Hale). Drawn into a mystery in Season One when their friend Alison went missing, the girls have worked to solve her disappearance — while deeper intrigue and adventure evolved around them, including being pursued and sabotaged by shady characters known only as “A” and Red Coat.

The end of Season Three solved some mysteries while deepening others, with several of the characters seeing the mysterious Red Coat as their supposedly dead friend Alison, and with the girls learning that Toby — a friend and once-and-again love interest for Spencer who the girls also thought was dead — was very much alive.

The question of Red Coat’s true identity, plus the possibility of a Spencer/Toby rekindling, were just two of the many plot threads left hanging between seasons.

Dougherty promises that this season’s early episodes, including the premiere, will provide many answers, particularly with the character Mona (Janel Parrish), who has gone from nerd to mean girl to mental patient — and was also revealed to be the mysterious “A” (before “A” became a larger team of people who were subsequently taken over by Red Coat). Many of the show’s questions concerning “A” will be revealed in the season premiere, he says.

For the actors, learning the truth behind the mysteries can feel like Christmas morning. When Parrish (whose Mona was one of the surprising conspirators — the other being Toby — who sent that girl on YouTube falling off her bed) filmed the scene where her character reveals a slew of information regarding her activities as “A” to the main four, she recalls the thrill of finally leaving those mysteries behind.

“It’s funny, because I was playing this mastermind who knew everything, and I didn’t know any of the answers,” says Parrish. “You just have to make them up in your mind, and have that conviction that you know everything.

“So it was amazing to finally get some answers.”

While the show is tight-lipped about its secrets, Parrish promises that answers to several key questions — including whether Alison is alive or dead, and the true identity of Red Coat — will be provided this season.

“I think this season’s gonna be great,” she says, “because we’re gonna give fans answers to things they’ve been wondering about for a really long time.”

And fan engagement, increasingly important across the TV landscape, is a key aspect of the show’s popularity.

According to ABC Family, the third-season finale was the first episode of any show ever to generate 1 million tweets while it aired. This intense type of reaction earned the show a fifth-season pick-up before the fourth season even premiered.

And the “PLL” cast members have started reaping the benefits of this popularity, with Benson recently co-starring in Harmony Korine’s debauched movie, “Spring Breakers.”

Part of the show’s attraction, says Dougherty, is that its mysteries intertwine in a way that attracts fans of other mystery shows.

“I read somewhere that we’ve started to pick up ‘Lost’ fans who felt burned by the end of that show,” says Dougherty. “They were looking for another serialized drama. There was [some guy online] saying that geeks should check this show out, because there’s a lot going on there.”

But for all the show’s intrigue, Dougherty believes that its success relies on the same simple factor as most other successful shows — a deep, personal connection between the viewers and the characters.

“I think the viewers love seeing girls this age this committed to each other as friends,” he says.

“I also think there’s a double connection between the fans and the show. They love the stories and characters, but they also have become very focused on liking the actors.