Tegan and Sara, as far as anyone could tell, were living the dream.

In 2013, after a decade and a half of slow and steady work, the twin-sister pop duo from Canada scored their first Grammy nomination, their first top 10 album and performed with Taylor Swift at the Staples Center in Los Angeles. They toured arenas the next year as an opening act for Katy Perry. In 2015, they even played the Academy Awards, where their earworm “Everything Is Awesome!!!” from “The Lego Movie” was up for the coveted original song prize.

Yet behind the scenes the sisters felt trapped in a nightmare.

Two years before the moment with Swift, Tegan Quin discovered that someone on the internet had hacked her personal files and was impersonating her in order to build intensely emotional — sometimes sexually charged — online relationships with members of the band’s audience. By the time of the Oscars, the scam had grown so elaborate that Tegan, who’d always taken pride in how available she made herself to her fans, didn’t know whom in her life she could trust.

“All the success was just making me more worried about my personal safety,” she says. “I was like, ‘well, this turns out to suck.’ ”

The harrowing tale gets a detailed accounting in “Fanatical: The Catfishing of Tegan and Sara,” a gripping new documentary from director Erin Lee Carr that premiered recently on Hulu. Pitched somewhere between a whodunit and a think piece, the film follows Tegan and Carr as they attempt to track down the digital con artist they call Fake Tegan, or Fegan for short. But “Fanatical” also tells a broader story about the blurriness of identity on the early social internet and about the toxic pop-star adulation that enabled Fegan to manipulate super fans eager to get close to their musical hero.

“I have a complicated relationship with the victims because they were online trying to get my personal information,” Tegan, 44, says of the people Fegan catfished, several of whom speak candidly in the film about the intimate connections they believed they shared with the real Tegan. “Obviously, it’s awful what happened to them. But also: You put yourself in this position by prying into my life.”

Why pull back the curtain now on a saga the sisters kept secret for years? Plenty about the reality of celebrity and its downsides bothered Tegan a decade ago. “I was creeped out and scared and didn’t want to be touched and grabbed and have people write incest fiction about me on the internet,” she says over coffee with Carr, 36, at a restaurant. “It was gross. But I didn’t feel like I was allowed to say those things — as a public person, as a woman, as a queer person — without seeming like a whiny little brat. The whole world was telling me not to complain about what was happening.”

Yet the discourse around pop music — specifically regarding the fraught parasocial attachment linking star and stan — has changed since the mid-2010s. Witness Swift’s “But Daddy I Love Him,” a blistering cut from the singer’s latest LP widely understood to be an allegory of her feelings toward fans who tsk-tsked her brief relationship with Matty Healy of the 1975. Or look at Chappell Roan’s recent pronouncements on social media in response to what she views as “predatory behavior” that’s “become normalized because of the way women who are well-known have been treated in the past.”

“I’ve been so inspired watching Chappell just say how she feels,” Tegan says.

“Fanatical” grew out of Tegan’s desire to chronicle the story of Fake Tegan in a podcast — an idea she took to Carr, who steered her toward making a documentary instead.

“I wanted to see what it would be like for Tegan to interact with these people” who’d been duped into thinking they knew her, the director says. “You can’t hear that — you need to see it.”

Among the movie’s more affecting scenes are those in which Fegan’s victims are clearly moved to meet the real Tegan, despite — or perhaps because of — the humiliating experiences that (sort of) involved her.

Tegan wonders whether being too open with fans and acquaintances — talking for hours (and hours) at the merch table after concerts, for instance, or maintaining an email correspondence with “a random guy from a radio station that I met one time in 2001” — somehow invited an intrusion like Fegan’s.

She says there were times when her sister blamed her for getting hacked: “She’d be like, ‘You’re too nice to strangers. You’re too nice when people approach you at the bar.’ ”

According to Sara, Tegan’s always been like that. “Even in elementary school, she’d become friends with the weird kid who’d be around for two months then disappear,” Sara recalls in a separate interview. “There’s just a curiosity in her about certain kinds of people that I don’t have. In fact, I’m not just not curious about those people — I’m wary of them.”

The way Sara sees it, fans are not unlike an artist’s customers. “Tegan and I could have a career-ending fight about this right now. This is where we do not agree. But to me, it’s like: You paid me for something, and I gave it to you,” she says, referring to a record or a concert. “That doesn’t mean you get to be in every other situation in my life.”

Asked for her response to Roan’s comments about overbearing fans, Sara says, “Of course she has every right to be like, ‘Y’all are crazy.’ ”

Inevitable or not, the Fegan drama — which “Fanatical” never quite resolves — led Tegan and Sara to back away from the highly exposed pop stardom they were approaching in 2015. “We’ve deliberately made less commercial records. We’ve gone back to working with indie people. We’ve toured less,” Tegan says. (The duo’s most recent album, 2022’s “Crybaby,” came out on the independent Mom + Pop label after a long stretch with the Warner Music company.)

“But it’s bigger than Fake Tegan. It’s the way the industry says, ‘Give us more. Put out more songs, play more shows, visit more radio stations.’ We drive artists to quit,” Tegan adds. “So I think that in conjunction with this incredible betrayal from our audience — it made us say, ‘We still love music so much that we have to find a way to fix this.’ ”

These days Tegan reckons that she’s a more guarded person than she was pre-Fegan, which if nothing else suits her partner, Sofia Snow, just fine. The two met in Los Angeles well after Tegan was hacked.

“And so we didn’t email, we didn’t FaceTime — we really said nothing of value to each other not in person,” Tegan says at the restaurant. With a laugh, she adds: “At the time, Sofia was actually a cybersecurity specialist.”

“Isn’t that insane?” Carr asks. “It was destiny.”