A landscaper who admitted stabbing his ex-girlfriend to death in a Glen Cove parking lot shortly after their breakup is heading to prison.

Calling the crime “heinous,” State Supreme Court Justice Angelo Delligatti on Monday sentenced Jose Luis Rodriguez-Cartagena, 56, to 18 years to life behind bars for the 2015 murder.

But the judge also said in a Mineola courtroom that the Glen Cove man’s previous guilty plea had saved the family of victim Yanira Estella Canjura Martinez, 32, the agony of a trial.

Delligatti trimmed two years off his previous sentencing commitment of a 20-years-to-life penalty, citing the man’s admission of guilt and agreement not to appeal the conviction.

Defense attorney Ronald Bekoff asked for a slight departure from the sentence agreement, saying his client had deep regrets about his “alcohol-induced” actions, would be “well into his 70s” when he could qualify for parole and is expected to be deported to his native El Salvador upon his release.

“The chances are zero he’s ever going to see the streets again in our country,” the Garden City lawyer said.

advertisement | advertise on newsday

Authorities said the victim was on her way to pick up her 5-year-old daughter on the afternoon of March 26, 2015, when Rodriguez-Cartagena stabbed her multiple times after a confrontation.

The woman had met him on social media before bringing her young daughter with her to the United States and moving in with him, according to authorities. They said she broke up with Rodriguez-Cartagena, ending their three-month relationship about a week before he killed her.

Law enforcement officials arrested Rodriguez-Cartagena in early April in California. They said he took a van to the West Coast, was working on a farm and intended to flee to El Salvador.

Before his initial murder arraignment, Rodriguez-Cartagena told reporters as police led him to court that he felt at the time of the crime that he was going to be killed. He didn’t say why.

Prosecutor Martin Meaney on Monday called the slaying “brutal” and asked for a sentence of 20 years to life for the defendant. He said he also gave the judge a letter from the victim’s sister that spoke of the slaying’s toll on her family.

Two of the victim’s children, ages 12 and 15, remain with family in El Salvador, Juana Canjura said in her letter. But the Utah resident said her sister’s youngest child, now 7, lives with her and cries every night because she doesn’t have a mother.

Nassau District Attorney Madeline Singas said in a statement Monday the defendant “senselessly murdered” the victim and “left three children without their mother.”

Bekoff said after court he thought the judge had been fair, adding: “He mitigated this terrible crime with concern for the defendant’s future.”