Video of a Staten Island man slam-dunking a basketball over an NYPD patrol car has gone viral, and both residents and police are touting it as a positive moment of community relations after the death of a local man whose chokehold arrest sparked outrage toward police.

The annual dunk contest across the Berry Houses complex Friday night was sponsored by UTL Basketball, a popular Staten Island summer basketball league. When the NYPD vehicle started rolling onto the court with its lights and sirens on, the large crowd gathered on the court seemed momentarily puzzled.

But it was all part of the show, according to league co-founder Joel Soto.

Soto had asked patrol officers if they wanted to participate in the competition by allowing one of the players to dunk over their car, the Staten Island Advance reports. The officers agreed after getting permission from their commanding officer.

The audience on the court appeared to realize the police were part of the contest, too, and began cheering as the car parked directly underneath the basketball hoop. The crowd parted as 20-year-old Brian Hogan-Gary, wearing a T-shirt reading "R.I.P. Eric Garner," barreled up the court, leaped over the NYPD cruiser and nailed the dunk.

The car's lights and sirens went off in celebration, and the crowd erupted in cheers and shouts.

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

"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," he said.

The NYPD showcased the video on its official Twitter account, and so did the local 122nd Precinct.

"Awesome slam!" read the tweet from @NYPD122Pct.

Soto said "it was a great moment for everyone involved."

Eric Garner died earlier this month after video showed him being placed in a chokehold by police as he was being arrested for allegedly selling single cigarettes on the street. The death has inflamed portions of the black community who feel victimized by police.

Mayor de Blasio said Monday that his administration is reaching out to those who feel upset. And he accepted responsibility for improving things, saying "the buck stops here."

De Blasio, a Democrat who took office in January, made improving relations between the NYPD and communities of color a centerpiece of his mayoral campaign.