An Atlantic Beach man who twice drove high on heroin, including once after his license was suspended, has received the maximum sentence of up to 7 years in prison, Nassau County prosecutors said.

Robert Kozak, 38, was sentenced Thursday by acting Supreme Court Justice Patricia Harrington to 2 1/3 to 7 years in prison.

Kozak pleaded guilty to driving while his ability was impaired by drugs, driving while his ability was impaired by the combined influence of drugs and alcohol, first-degree aggravated unlicensed operation of a motor vehicle -- all felonies -- and seventh-degree criminal possession of a controlled substance.

Also, his driver's license was revoked.

Acting Nassau County District Attorney Madeline Singas said Kozak drove under the influence of heroin in two separate incidents just three months apart.

"Each time Mr. Kozak got behind the wheel while high on heroin, he was playing Russian roulette with other people's lives," Singas said in a news release. "Thankfully, this defendant's repeated disregard for the safety of others did not result in injury or death."

advertisement | advertise on newsday

On Oct. 2, 2014, Kozak rear-ended another vehicle stopped at a red light at the intersection of Monroe Boulevard and East Park Avenue in Long Beach.

Responding officers said Kozak was observed to be impaired by heroin. Officers said they saw Kozak's arms bleeding, "with visible track marks . . . indicating recent heroin use."

He was arrested and refused to submit a blood sample, prosecutors said.

On Jan. 15, 2015, Kozak -- whose license was revoked after the October arrest -- was seen by a witness to be asleep at the wheel of his vehicle at a green light on Lakeview Avenue in Lynbrook.

Kozak woke up and proceeded to drive erratically toward Merrick Road, prosecutors said.

The witness called 911, and Kozak was stopped shortly thereafter by a Lynbrook Village officer. He was observed to be impaired by both alcohol and heroin, prosecutors said, and Kozak's arms again had fresh track marks indicating recent heroin use. Several bags of heroin also were on the floor of his vehicle.

Prosecutors said Kozak again refused to take a blood test.

Kozak admitted in court that he was high on heroin on both occasions, the district attorney's office said.