Video: Miami Heat Fan Runs onto the Court, Steals Match Ball after Free Throw

For a sport played in such close proximity to fans, court invasions in the NBA are extremely rare.

But they do occur from time to time, as Denver Nuggets and Miami Heat players found out for themselves on Tuesday night.

Read more: Kevin Durant 'has no clue' where New York Knicks rumors came from

With the Heat down 102-99 and less than a second on the clock, a fan clad in a Dwyane Wade jersey ran onto the court, grabbed the game ball and shouted “Don't do that!” towards Nuggets guard Jamal Murray.

Murray, who had just scored the first of two free throws to put his team up by three points, looked around bemused as the mysterious invader was apprehended by security after returning to his seat.

The bizarre incident came after a hectic spell of play had seen Nicola Jokic give the Nuggets a 101-99 lead with 2.4 seconds left in the game.

Heat's head coach Erik Spoelstra then called a timeout, but any hopes of a game-tying bucket evaporated almost immediately as Miami's subsequent inbound pass went straight out of bounds.

Left with no other option but to foul a Nuggets player to stop the clock, the Heat then sent Murray to the free throw line, before the intruder made his appearance.

Once security subdued the fan, Murray was eventually allowed to take his second free throw, which he converted to secure a 103-99 for the Nuggets.

The seventh overall pick of the 2016 draft finished with 18 points, six assists and four rebounds, shooting seven-of-19 from the field.

Jokic had 29 points, 10 assists and 11 rebounds in 40 minutes on the court, while Torrey Craig chipped in with 11 points and 16 rebounds.

With the win Denver improved to 27-12 and strengthened its grip on the first spot in the Western Conference standings, while Miami slipped to 19-20 and remains sixth in the Eastern Conference rankings.

Nuggets coach Micheal Malone was particularly pleased with the win, which came after a defeat in Houston the previous evening and without the injured Gary Harris, who nursed a hamstring problem.

"I don't know if it's a statement win or not,” Malone was quoted as saying by The Associated Press.

“But it's a win where we had every reason to use an excuse for the loss. And we don't want to be a team that makes excuses. We want to be a team that finds ways when everything is stacked against us."

Dwyane Wade, Miami Heat
Dwyane Wade #3 of the Miami Heat walks on the court during the game against the New Orleans Pelicans at the Smoothie King Center on December 16, 2018 in New Orleans, Louisiana. Chris Graythen/Getty Images