The drama wasn’t only on the court during Game 7 of the NBA Finals. Rapper Drake got into an argument with a fan sitting courtside at American Airlines Arena.

Sources say an “older gentleman” started annoying the rapper during the Heat-Spurs game. A witness reports, “The guy was like, ‘Drake!? Why are you here?’ and started heckling him.” Then, “They were yelling at each other — the guy would made a stupid comment, Drake would make one back — and it went back and forth.”

But the source said that the warring fans reconciled by the time the Heat clinched their second consecutive title. “They made up and hugged at the end,” our spy said.

Drake then headed off to party in the locker room with the NBA champs, but was denied when a security man told him, “No access. Media only.” Drake shot back, “I am media!” but the guard wasn’t buying it.

In the locker room, LeBron James, Chris Bosh and Ray Allen sprayed 100 magnums of Moët Ice Imperial, and Dwyane Wade playfully poured bubbly on his aching knees, we’re told.

The champs then headed to South Beach club Story, where DJ Irie entertained, and 100 bottles of Dom Perginon Illuminous were popped. Even Drake finally met up with the team and gave a surprise performance.

“Drake was standing next to LeBron and Wade, drinking champagne, going nuts, rapping ‘Started From the Bottom,’ ” said a partygoer.

Later, hip-hop producer Timbaland made a surprise appearance in the DJ booth. At 3:30 a.m., Heat coach Erik Spoelstra strode in, followed by GM Pat Riley and wife Chris, Blaine Trump and her boyfriend Steve Simon, and Heat owners Micky and Madeleine Arison.

At 4:30a.m., South Beach steakhouse Prime 112 delivered fried chicken and waffles, meatballs, and Kobe beef sliders to the nightclub.

“LeBron and Wade sat in the middle of the club with champagne in one hand and chicken and waffles with the other,” said a witness. We’re told the place didn’t close until nearly 7 a.m.