A man who allegedly shot and killed an NYPD officer in Queens two years ago is set to appear in court Tuesday for opening statements in his trial on murder and other charges.

Guy Rivera is accused of opening fire at 31-year-old Officer Jonathan Diller and his partner

after they approached the illegally parked car Rivera was in at a Far Rockaway bus stop in March 2024.

Diller was shot under his bullet-resistant vest and was later pronounced dead at Jamaica Hospital, authorities said. Prosecutors said Rivera also tried to shoot another officer during the incident, but his gun jammed.

Rivera pleaded not guilty to the charges, which include criminal weapons possession. He was shot when Diller’s partner returned fire, and later recovered at the hospital.

Diller’s death sparked an outpouring of grief among members of the NYPD, who lauded his achievements during his three years of service and mourned with his wife and then-1-year-old son.

Donald Trump, who was running for president at the time, attended Diller’s wake on Long Island. Then-Mayor Eric Adams, who spoke at Diller’s funeral, reiterated his support for the NYPD.

The day after the shooting, Rivera’s mother told Gothamist her son had a difficult past with law enforcement, including allegedly being assaulted by correction officers during his most recent prison stint.

Online records show Rivera served almost three years at Southport Correctional Facility, an ultra-maximum security prison in upstate New York, for attempted assault in the first degree. Records show he was released in 2014, then rearrested in 2016 for selling drugs. He was released in 2021, and his parole expired in 2022.

Rivera faces the possibility of life in prison without parole if convicted, according to Queens District Attorney Melinda Katz.

The alleged driver of the car on the night of Diller’s killing was Lindy Jones, who was charged with criminal weapons possession and defacing a weapon after authorities said they found a loaded pistol in the glovebox with the serial number scratched off.

This is a developing story and may be updated.