In the final season of The Sopranos, Tony Soprano (James Gandolfini) becomes very close to Agent Harris of the FBI. Harris, who could never stay away from Satriale’s (the sandwiches were too good), eventually helps Tony track down his rival, Phil Leotardo (Frank Vincent).

Later, when Harris hears Leotardo has been killed, he accidentally celebrates in front of his FBI colleague. While that funny moment might not represent the way things actually run at the Bureau (we hope), that’s not to say The Sopranos didn’t get a lot right.

In the first episode of Season Three, agents plant wiretaps at the home of Tony Soprano. FBI agents were reportedly amazed at how that episode recreated the way they operate during a real investigation.

Meanwhile, numerous aspects of the Soprano organization matched actual characters and events in New Jersey mob history. For the mobsters themselves, it sometime hit a little too close to home.

FBI agents heard mobsters wonder where ‘Sopranos’ writers got their information.

A scene from Season 1 of ‘The Sopranos’ | HBO

Five years after the final Sopranos episode aired, the show’s cast and crew spoke with Vanity Fair in what became an oral history of the series. Terence Winter, a writer and producer who later created Boardwalk Empire, told the story of FBI agents who watched the show every Sunday.

Winter recalled agents telling him they’d discuss the latest episode on Mondays at work. But they weren’t the only ones. “They would listen to the wiretaps from that weekend, and it was Mob guys talking about The Sopranos,” Winter said.

Naturally, the FBI agents and mafiosos had very different takes on the show. However, one thing stuck out — both sides remarked on how realistic it seemed. “We would hear back that real wiseguys used to think that we had somebody on the inside,” Winter told Vanity Fair.

However, mobsters weren’t the only ones confusing a fictional TV show for their own world.

The actor who played Johnny Sac had a priest call him by his ‘Sopranos’ name.

Tony Sirico, Steven Van Zandt and James Gandolfini work on a scene from ‘The Sopranos.’ | Anthony Neste/The LIFE Images Collection via Getty Images/Getty Images

Vincent Curatola, the actor who played New York boss John Sacrimoni (Johnny Sack), told Vanity Fair a story of his own that blended fact and fiction.

Once, while attending a different church one Sunday, he approached the priest to receive communion. Recognizing his new parishioner right away, the priest said, “Oh, Body of Christ, Johnny.”

Sopranos writers also had a knack for bringing the real lives of the cast into their characters. The most famous example might be the germophobia writers gave Paulie, as Tony Sirico was like that in real life. (Sirico also lived with his mother for a long time before she died.)

It was for that reason Gandolfini called the writers (including creator David Chase) “vampires.” Wherever the show’s writers could find convincing material, they’d go get it. Two decades after the show’s premiere, you can’t fault their technique.

Also see: The ‘Sopranos’ Fan Favorite Who Almost Played Tony Instead of James Gandolfini