A 35-year-old woman was charged on Tuesday with stabbing a man to death inside a Sunset Park restaurant, police said, butshe claimed it was self-defense.

Jian-Yang Zhang, 41, went to visit his sister in Lucky Zhang’s restaurant on Eighth Avenue, near 57th Street, on Monday night, police said. While there, he started fighting with 35-year-old Lan Shui Yu, who worked at the restaurant.

Investigators believe Zhang, who is married, had a prior relationship with Yu, a law enforcement official said.

The fight then escalated and the woman stabbed Zhang in his back and neck at about 10 p.m., the official said. He was taken to Maimonides Medical Center, where he was pronounced dead.

Yu was charged with second-degree murder and criminal possession of a weapon, police said. She apparently said she attacked in self-defense, the official said.