The Sopranos includes several references to the 1990 gangster classic Goodfellas, and the best one cites the infamous Billy Batts murder. The HBO series isn't based on real-life mobsters like Martin Scorsese's film, though creator David Chase did incorporate his personal experiences from growing up in New Jersey. Both productions share various actors and actresses, which allowed for The Sopranos to incorporate meta thematic callbacks to Goodfellas.

Based on Nicholas Pileggi's 1985 book Wiseguy, Goodfellas tells the story of Lucchese crime family member Henry Hill. American actor Ray Liotta stars in the lead role, and narrates the film as his character becomes more prominent within the organization. Robert De Niro co-stars as Henry's mentor Jimmy Conway - a character who is based on Lucchese family gangster James Burke. In a supporting role, Joe Pesci portrays Tommy DeVito, a fictionalized version of another Lucchese family member named Thomas DeSimone. In June 1970, DeSimone murdered William "Billy Batts" Bentvena (a member of the Gambino crime family)  with the assistance of Hill and Burke. The unauthorized mob execution is recreated by Scorsese in Goodfellas.

Related: The Sopranos: How Christopher Is Related To Tony (He's Not His Nephew)

In The Sopranos, the death of Angelo Garepe thematically links to the Billy Batts murder in Goodfellas. Portrayed by Joe Santos, Angelo first appears in The Sopranos season 5 premiere as a long-time member of the Lupertazzi crime family. After serving a jail sentence, the former consigliere appears to retire but remains involved in a leadership role with the support of Tony Soprano (James Gandolfini), the boss of the DiMeo crime family. Angelo later enlists his prison friend Tony Blundetto (Steve Buscemi) to kill Joseph "Joey Peeps" Peparelli in retaliation for the murder of Lorraine Calluzzo (Patti D'Arbanville). In response, Phil Leotardo (Frank Vincent) and brother Billy Leotardo (Chris Caldovino) track down Angelo and kill him. The trunk deaths of both Angelo and Billy Batts are linked by Vincent, who plays the victim in Goodfellas and the assassin in The Sopranos.

Billy Batts in Goodfellas

Angelo and Billy Batts both technically die in trunks, but the Goodfellas sequence is much more bloody. Batts initially offends Tommy at a night club, which is based on a real-life incident between Bentvena and DeSimone, in which the former asked the latter if he still shined shoes. Goodfellas stays faithful to what transpired in real life, as DeSimone attacked Bentvena at a club owned by Hill. Bentvena actually survived the attack (like Billy Batts in Goodfellas), and was later killed in a trunk. Vincent, who portrayed Billy Batts in Scorsese's film and Phil Leotardo in The Sopranos, passed away in September 2017 at age 80.

The Angelo death scene in The Sopranos also references the most famous mobster movie ever made, Francis Ford Coppola's The Godfather. In the HBO series, Angelo drives a Lincoln Continental before he's killed. James Caan's Sonny Corleone similarly drives a Lincoln Continental when he's ambushed and killed in The Godfather. Angelo's death scene also has another meta reference, as the character listens to the song "Peanuts" by Frankie Valli and the Four Seasons, which is significant because Valli himself portrays Rusty Millio in The Sopranos - the character that instigates the feud between Angelo and fellow Lupertazzi crime family member Jonathan "Johnny Sack" Sacramoni (Vincent Curatola) by plotting the murder of Joe Peeps.

More: Why The Sopranos Series Finale Ended So Abruptly