An Oakdale man used the Long Island Expressway “as his own drunken thoroughfare” and recklessly caused the 2012 death of a Nassau County police officer who came to his aid at a debris-strewn crash scene, a prosecutor told jurors Tuesday as the defendant’s trial began.

But a lawyer for James Ryan, 28, countered that it was a different driver who struck and killed Officer Joseph Olivieri Jr. while barreling through the area. She said authorities had blamed the wrong man for the veteran cop’s death.

Ryan is facing up to 25 years in prison if convicted during the Mineola trial on an aggravated vehicular homicide charge, the top count against him.

Prosecutors have said Ryan’s vehicle struck a car on the LIE, then caused a collision with a second car that rear-ended him. After Olivieri arrived to help Ryan, an oncoming Cadillac Escalade hit and fatally injured the officer, according to the district attorney’s office.

A Nassau judge dismissed the top charges against Ryan in 2013, saying the crash was “solely attributable” to the Cadillac driver. But an appellate court restored those charges last year.

The Cadillac driver got immunity after testifying before the grand jury. Prosecutors decided his actions weren’t criminal.

advertisement | advertise on newsday

“Officer Olivieri died protecting the very person whose recklessness killed him,” Nassau Assistant District Attorney Michael Bushwack said in his opening statement Tuesday.

But defense attorney Zeena Abdi told jurors: “Make no mistake, James Ryan did not hit Officer Olivieri. James Ryan did not kill Officer Olivieri. James Ryan did not cause his death.”

The prosecutor depicted Ryan as a “dangerously drunk” motorist who caused two crashes and then ultimately the death of Olivieri by setting a fateful chain of events in motion in the early morning of Oct. 18, 2012.

“He put himself in that seat and Officer Olivieri in his grave,” Bushwack said.

Ryan, who had been drinking at a Manhattan lounge, hit one car while driving more than 70 mph, before slamming on his Toyota Camry’s brakes and causing a crash with an off-duty NYPD detective near Exit 35 in North Hills, the prosecutor said.

Olivieri was the first responding officer and asked for an ambulance and more police units to come to the scene right away, Bushwack told jurors.

“The last words he would ever speak were an effort to help and protect others, including this defendant,” Bushwack said.

The prosecutor said the Cadillac driver then hit Olivieri as Olivieri was by Ryan and his Camry in the eastbound HOV lane.

Bushwack said the Cadillac driver “was rubbernecking,” with his eyes drawn to the flashing lights on Olivieri’s car, and that overhead LIE lights were out.

Driving 40 mph, that motorist didn’t see anything in the HOV lane until the last moment, but it was too late when he swerved and hit his brakes, the prosecutor said.

advertisement | advertise on newsday

But Abdi, the defense attorney, insisted that the Cadillac driver, a motorist with a “horrible driving record,” was responsible for the officer’s death.

“It is a tragic case. But it is a stretch,” Abdi told jurors of the prosecution putting blame on Ryan.

She said there was no continuing chain of events, and it was “a case of three separate accidents.”

Abdi said several minutes passed after the second crash, and civilians were even directing traffic when the Cadillac driver “managed to miss everything and drive right through an accident scene.”

“It’s amazing and unfathomable that he ignored all these things and struck Officer Olivieri,” the Mineola attorney said.

advertisement | advertise on newsday

Members of Olivieri’s family were in court, and declined comment through Nassau County police union president James Carver.

Olivieri was 43 when he died and had been on the Nassau police force for 13 years after five years with the NYPD.

Carver said Olivieri died before he ever got to meet his first grandchild, a little boy who’s now 19 months old.

“We don’t know what the outcome of the case is going to be, but at the end of the day, what we’re asking everybody is ‘Never forget Joe Olivieri,’” he said.