The man who fatally stabbed his wife in a Manhattan liquor store Wednesday night shouted “that’s what you get for breaking up with me” and tried to ram a ring down the woman’s throat, police and sources said Thursday.

The 64-year-old woman, whose name is being withheld pending family notification, fled into Wine Heaven on Third Avenue in Turtle Bay to escape her knife-wielding husband John L. Foster, 63, around 10:20 p.m. Wednesday night, police sources said.

Foster issued the grim warning as he attempted to force her ring down her throat, sources said, adding cops have video of the attack.

A good Samaritan tried to jump in to help but was punched in the face by Foster, the sources said.

The woman, who lives about a block away from the store, suffered five stab wounds to the chest, police said.

Police said they recovered a knife at the grisly scene.

The suicidal Foster then fled onto a nearby Third Avenue rooftop, where he remained in a stand-off with cops until around 3 a.m., occasionally telling them to shoot him, police said.

At one point he said that his wife was “the love of my life,” police said.

The NYPD’s hostage negotiators and Emergency Service Unit were both on the scene and managed to talk Foster down from his perch. He was taken into custody but hadn’t been officially charged by Thursday afternoon.

Foster has 18 prior arrests dating back to the 1980s. His last arrest was on a second-degree assault charge in 2018. He was also arrested on that charge in 2012.