Police Officer Brian Mulkeen, 33, was working to keep New York safe when Antonio Lavance Williams killed him.

Mulkeen’s unit was on patrol late Saturday, investigating gang activity in the Edenwald Houses in the Bronx. Williams fled when the cops tried to question him. As Mulkeen and his partner moved in for an arrest, they spotted a gun.

As he grappled with Mulkeen, Williams reached for the cop’s weapon, which went off five times as other officers started shooting, killing Williams on the scene.

Hit in the head, chest and legs, Mulkeen was rushed to Jacobi Medical Center, where he was declared dead. The nearly seven-year veteran of the force is survived by his mother, father, sister and girlfriend, also a Bronx police officer.

“He was a remarkable human being. Everybody loved him,” his father told The Post.

On probation until 2022 for a narcotics arrest last year, Williams, 27, also had a prior Rockland County burglary conviction.

As Gov. Andrew Cuomo put it Sunday morning, Mulkeen “was taken far too early from his family and from the city he sacrificed everything to protect. He is the embodiment of bravery and a true NY hero.”

Protecting ordinary New Yorkers was his life’s work, as it is for every member of the NYPD. At 12:30 a.m. Sunday, he was “doing the job we asked him to do, a job that New Yorkers needed him to do,” noted Chief of Department Terence Monahan.

Rest in peace.