The three people responsible for a deadly East Village gas explosion that leveled several buildings and killed two men landed four to 12 years behind bars Friday.

Manhattan Supreme Court Judge Michael Obus handed down the prison time to landlord Maria Hrynenko, 59, contractor Dilber Kukic, 44, and unlicensed plumber Athanasios “Jerry” Ioannidis, 63 — who illegally diverted gas from one Second Avenue building to another, triggering the tragic blast in March 2015.

“What the defendants did, in a matter of speaking, was roll the dice with the lives of many people,” Obus told a packed courtroom. “The results, as we know, are catastrophic.”

Relatives of the defendants burst into tears as the judge read the sentence — and Hrynenko shouted, “I love you!” to a family member as she was cuffed and hauled away.

Hrynenko, who owned the buildings, and the others rigged a hidden basement set-up to funnel gas from 119 Second Ave. to 121 Second Ave. near Seventh Avenue, causing the explosion, according to prosecutors.

The fiery blast killed Nicholas Figueroa, 23, who had been eating lunch at Park Sushi on the ground floor of 121 Second Ave., and Moises Locon, 27, a busboy at the restaurant. The explosion also maimed at least 13 other people.

Judge Obus said the neighborhood disaster could have been much worse.

“They bypassed strict regulations,’’ he said of the defendants. “Two people were killed, many others were seriously injured. It’s miraculous that more people were not injured or killed.”

Still, Obus said he was giving the defendants a break on their prison time because they were older and “did not intend to blow up the building.”

All three defendants were found guilty of manslaughter in November and faced a maximum sentence of 15 years.

Kukic and Hyrnenko were caught on surveillance-camera footage the day of the explosion fiddling with their hidden gas set-up — and running through the restaurant without warning patrons about the potential gas leak, officials said.

Wearing a blue suit with no tie, Kukic addressed the court to apologize to the families of Figueroa and Locon.

“I feel very bad for the families who lost their brother and son. If I was able to change it, I would give my life for theirs in a second,” he said.

Manhattan District Attorney Vance warned other landlords to think twice about using shoddy gas lines.

“If you cut corners based on expediency and profit and kill or injure New Yorkers in the process, you are engaging in criminal conduct,” he said. “Developers and property owners across the city should keep today’s sentencing in mind.”