WARNING: Major spoilers for Uncut Gems ahead.

Uncut Gems features multiple events that happened in the real world. Rather than being set in present day New York, Benny and Josh Safdie's film takes place in 2012, and the script integrates the real life events of two of its cast : former NBA star Kevin Garnett and singer The Weeknd.

In Garnett's first major film role, the former Boston Celtics star plays a fictionalized version of himself, who becomes obsessed with a rare gem that Howard Ratner (Sandler) procures from Ethiopia. Garnett brings the gem with him to two 2012 NBA playoff games, which played out in the film's story. Additionally, Canadian singer Abel Tesfaye (known as The Weeknd) plays himself, as Uncut Gems coincided with the current pop superstar's rise to fame.

Related: Uncut Gems Cast & Character Guide

The Safdie Brothers made all of the real-life events essential to the drama as well as Ratner's trials and tribulations, effectively weaving them into the script. Here's how all of Uncut Gems' actual events went happened in real life.

Celtics vs. 76ers, Game 3

Kevin Garnett

The first of the two NBA games that played a pivotal role in Uncut Gems was Game 3 of the Eastern Conference Semifinals, which took place on May 16, 2012, between Garnett's Celtics and the Philadelphia 76ers. Garnett, playing a seven-years-younger version of himself that was still in the NBA, visits Ratner's shop early that day, and Ratner shows him a rare opal that he managed to siphon from a mining accident in Ethiopia. Garnett becomes enamored with the opal, eventually convincing Ratner to let him hold it for Game 3 in exchange for his NBA championship ring. Meanwhile, Ratner puts a huge bet on Garnett's performance in the game, parlaying the overs on a number of his stats.

In real life, Game 3 was one of Garnett's best performances. The Celtics were favored in the series, with Philadelphia only having managed to sneak into the second round after their first round opponent, the Chicago Bulls, lost former MVP Derrick Rose to a season-ending injury. But Philadelphia was surprisingly competitive in the first two games, losing Game 1 by just one point, then stunning Boston with a Game 2 victory. The Celtics then dominated as they were supposed to in Game 3, with Garnett tallying 27 points and 13 rebounds in a 107-91 victory.

The game had tremendous importance in Uncut Gems. Garnett's performance had Ratner hitting his parlay, and appearing to collect a huge payday. But his loan shark brother-in-law Arno (Eric Bogosian), to whom he owes money, puts a stop on the bet. This only further puts him in debt, leading to a series of increasingly erratic decisions. Additionally, Garnett refuses to give the gem back, believing it to be the key to his great play – causing further problems for Howard.

The Weeknd plays an early club show

The Weeknd

Another celebrity that plays a seven-years-younger version of himself is Abel Tesfaye, or The Weeknd. Now an international superstar, in 2012 he was very much still up-and-coming, having yet to release a studio album. Ratner's associate and mistress Julia (Julia Fox) photographs Tesfaye, saying he is going to be huge "even though he is Canadian." Howard crashes one of his club shows in New York, hoping to find the missing opal there. Unbeknownst to him, Tesfaye and Julia are together in a bathroom backstage.

It's certainly feasible that The Weeknd would have been playing low-key club shows around this time, but it's possible that this specific show in Uncut Gems was a creative liberty taken by the Safdie Brothers. The show must take place in the days after Game 3, likely May 17th or later, as they had been chasing down the opal for at least a full day. In real life, The Weeknd was in the midst of his first-ever solo tour, but he had two sold-out shows in New York the month before: April 25 at Music Hall of Williamsburg and April 28 at Bowery Ballroom. He had no shows between May 11 and June 2, so he could have conceivably done a smaller club appearance in New York as portrayed in the film. But there is no record of it actually happening. The song he sings in the film, "The Morning," was released in 2011 on his mixtape House of Balloons.

When Howard arrives at the concert, not only does he not get the gem back, he also discovers Julia in the bathroom with The Weeknd. The two men fight, and Howard storms out, later kicking Julia out of his apartment.

Celtics vs. 76ers, Game 7

Kevin Garnett talks to Lakeith Stanfield and Adam Sandler in Uncut Gems

Uncut Gems' climactic scene takes place in the backdrop of the seventh and final game of that Eastern Conference Semifinal series, which occurred on May 26, 2012. After giving the opal back to Howard, Garnett had a bad outing in Game 4, only scoring nine points. So he made it his mission to get it back, eventually buying it from Ratner for $175,000. Ratner, in the throes of his gambling addiction, decides to make the move that would ultimately seal his fate. Instead of taking that money and repaying the loan sharks – who are literally in his store at this exact moment to collect – he takes the entire sum and bets it on another parlay involving Garnett.

In order for Howard to win the bet, Garnett has to win the opening tip, collect a combined 27 rebounds and points, and the Celtics have to win the game. The film's pulse-pounding finale involves Ratner watching the game with the loan sharks trapped in his store, after Julia races to the Mohegan Sun casino in Connecticut to place the bet. In real life, this turned out to be another signature game from Garnett. He scored 18 points and collected 13 rebounds, leading the Celtics to victory and the next round of the playoffs. The film shows a postgame interview with Garnett where he says he is all about "the rock," which has a double meaning – it could either mean the basketball, as it is often referred to, or the actual gem itself. However, this interview is fake. In the real interview, conducted by ESPN's Doris Burke, he mostly focuses on his teammates. "Anytime you win, that's all the satisfaction you need," Garnett actually said after the game.

Unfortunately, things end badly for Ratner. Despite winning his parlay and cashing in with over $1.6 million, one of the fed-up loan sharks immediately shoots Howard in the head when he lets him out of captivity. Julia does make it out with the money, despite the loan sharks' goons pursuing her at the casino. But the final shot shows Ratner lying dead on the floor, as the goons loot his shop.

Next: Uncut Gems Ending Explained