An NYPD cop was captured on video saying “there’s one less a–hole to sue us” as he watched helicopter footage that shows a masked Brooklyn gunman dying after he was shot by officers.

In the black-and-white aerial video obtained by The Post, the suspect, identified by police as Bloods gang member Brandon Clayton, is seen on the ground in the back yard of a Brownsville home following a wild gun battle with police.

“Boom,” the officer who made the comments can be heard saying in the video.

That officer was recording the NYPD aviation footage of the incident from a screen when he made the comments, a police source said.

The video has been making its way around the police department, the source added.

“The NYPD is aware of the video and it is under review,” an NYPD spokeswoman told The Post.

According to the police, Clayton, 29, was killed early Monday in a fierce firefight involving seven police officers after he shot at a patrol car.

Clayton was wearing a mask when officers on patrol near Howard and Dumont avenues tried to confront him around 2:30 a.m., NYPD Chief of Department Terence Monahan said.

The suspect took off running toward a Howard Avenue residence and, moments later, fired several rounds at the officers’ squad car.

A cop returned gunfire and the suspect fled, only to pop up on police radar about 30 minutes later when a local resident alerted authorities that a man was trying to break into a back yard on Howard Avenue.

“As uniformed patrol officers gained entry to the back yard, they were fired upon numerous times and exchanged gunfire with the perpetrator,” Monahan said.

A hail of bullets flew before Clayton ultimately was taken down.

He was pronounced dead at Brookdale Hospital Medical Center.

Additional reporting by Craig McCarthy