Guy Rivera, charged in the killing of NYPD Det. Jonathan...

Guy Rivera, charged in the killing of NYPD Det. Jonathan Diller, appears in Queens Criminal Court on July 22. Credit: Ed Quinn

A Queens state judge ordered that a DNA sample be taken from a man accused of shooting and killing NYPD Det. Jonathan Diller, of Massapequa Park, last March.

In a three-page order signed Monday, Queens State Supreme Court Judge Michael Aloise directed that a buccal swab be taken from Guy Rivera, 34, for DNA analysis by the New York City Medical Examiner's Office for comparison with evidence recovered by investigators from the crime scene.

Aloise said the DNA sampling and analysis are considered safe and reliable. The defense attorney and his investigator could be present when the DNA swab is taken, Aloise added.

The testing was requested by the Queens District Attorney's Office. Legal Aid Society defense attorney Jamal Johnson couldn’t be reached for comment.

Rivera is being held without bail since his arrest in March after he allegedly shot and killed the 31-year-old Diller during an encounter as Rivera sat in a parked Kia car on Mott Avenue in Far Rockaway. Rivera faces first-degree murder, weapons possession and other charges.

According to investigators, Diller and other officers — who were doing community patrolling — spotted Rivera walking on a sidewalk with what appeared to be a bulge in the front pocket of his sweatshirt.

After Rivera entered the parked Kia, Diller approached the vehicle and then tried to open the passenger side door, prompting Rivera to engage in a tug-of-war with the officer, police have said.

Diller eventually got the door opened and, according to police, ordered Rivera to remove his hands from the front of his sweatshirt. It was then that Rivera fired a handgun, striking Diller once in the torso just below the edge of his protective vest, according to investigators.

Another officer fired through the open driver side window and hit Rivera once in the back, police said.

NYPD Det. Jonathan Diller.

NYPD Det. Jonathan Diller. Credit: TNS/NYPD

Diller was taken to a hospital where he died, leaving a wife, Stephanie, and toddler son, Ryan. He was promoted to the rank of detective at his funeral.

Rivera was quickly arrested and also hospitalized. Lindy Jones, the man in the driver’s seat of the Kia, wasn’t injured but was arrested on weapons possession charges in connection with the shooting.

According to police, a 9 mm handgun was found in the glove compartment of the Kia and another handgun was found on the floor of the vehicle on the passenger side. While Aloise’s order didn’t specify what items of evidence Rivera’s DNA was to be used with, one detective familiar with the case said the genetic material could be compared to any DNA taken from the handguns found in the vehicle.

Rivera pleaded guilty to reckless endangerment in another case in 2011 and sentenced to 3½ years in prison for firing a handgun at a man.

Rivera is next due in court on April 3.

Patchogue missing girl case in court ... Carter state funeral ... Head of Harbor dispute  Credit: Newsday

Fire destroys Copiague house ... Garbarino, LaLota to meet Trump ... Elmont senior co-op demolished ... NYS prenatal care changes

Patchogue missing girl case in court ... Carter state funeral ... Head of Harbor dispute  Credit: Newsday

Fire destroys Copiague house ... Garbarino, LaLota to meet Trump ... Elmont senior co-op demolished ... NYS prenatal care changes

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME