STATEN ISLAND, N.Y. — Call it a slam dunk for community relations.

When an NYPD patrol car rolled into the park across the street from the Berry Houses complex during an annual basketball tournament held there Friday, players and spectators feared police had arrived to break up the game.

But organizers from the Under the Lights basketball league, who run the tournament in Dongan Hills, say it was all part of the show.

One of the league's founders, Joel Soto, asked cops patrolling the area if they wanted to help out in the tournament's slam dunk competition by allowing one of the players to dunk over their car. They agreed, Soto said, after receiving permission from their commanding officer.

The cop parked the car just in front of the hoop to the confusion of everyone standing around.

And then something amazing happened.

The player, Brian Hogan-Gary, 20, pulled off his jersey to reveal a shirt that had "R.I.P Eric Garner" written on the front. He teed up for the shot, and proceeded to launch himself over the cop car, completely clearing it and slamming home the dunk.

Cops blared their lights and sirens on cue from Soto, and the crowd went nuts.

"The cops were really great and nice about it — it was a little bit surreal," said Soto.

Video quickly surfaced on social media of the cop car slam dunk, with users praising police for their efforts. The NYPD also tweeted about the slam dunk on its official Twitter account.

"People were really surprised the cops wanted to be a part of it," said Soto, adding, "It definitely brought down a little of the tension between police and the community."

Many community members and activists have protested the actions of the NYPD since the July 17 death of Eric Garner in police custody.

Video of the incident shows NYPD Officer Daniel Pantaleo putting the 43-year-old man in an apparent chokehold as he tried to arrest Garner on allegations he was selling untaxed cigarettes.  

Garner repeatedly gasped that he couldn't breathe as he was pulled to the ground, and was later pronounced dead at Richmond University Medical Center, West Brighton. 

His death sparked calls of police brutality with several rallies being held on Staten Island and elsewhere protesting the actions of police.

But for a brief moment during Friday's basketball tournament, cops and the community celebrated a moment of comradery.

Screen Shot 2014-07-27 at 2.09.23 PM.pngView full sizeBrian Hogan-Gary, 20, wears his "R.I.P. Eric Garner" shirt during an Under the Light's league basketball competition held on Friday in Dongan Hills. (Photo courtesy of UTL) 

"It was good for both sides," said Soto. "The cops definitely wanted to use this as a way to get a good relationship between them and civilians, but besides that it felt real — they were just as into it as everyone else there."

Garner's two teenage sons are members in the league, Soto said, but weren't present for the cop car slam dunk. Soto said he spoke with Garner on a few occasions, describing him as a "really nice guy," who would "crack jokes and watch his sons play basketball."  

"Everyone really respects Garner here and feels for him … he was part of the Under the Lights family," Soto said.

The player who made the slam dunk ended up winning that portion of the competition, Soto said, and deservedly so.

"It was a great moment for everyone involved," he said.