Beloved food influencer Michael Duarte was gunned down by Texas police as he was allegedly threatening to kill people with a knife on Saturday.

Duarte, 36, was killed by two gunshots from a Medina County sheriff’s deputy in Castroville, police told The Post.

Michael Duarte, Jessica, and their daughter Oakley in a vehicle.Beloved food influencer Michael Duarte was gunned down by Texas police as he was allegedly threatening to kill people with a knife on Saturday. Instagram/jessicaleeduarte

Police had responded to a 911 call about a “male subject with a knife acting erratically,” police said.

“Duarte was exhibiting erratic behavior and making threats to kill everyone,” said a statement from the Medina County Sheriff’s Office.

“After multiple verbal commands were given for M Duarte to get on the ground by the Deputy … M Duarte charged toward the Deputy while yelling, ‘I’m going to kill you.’ The Deputy discharged two rounds from her duty weapon, striking M Duarte,” police added.

Food influencer Michael Duarte with a woman on a boardwalk with sand and palm trees in the background.Duarte, 36, was killed by two gunshots from a Medina County sheriff’s deputy in Castroville. Instagram/jessicaleeduarte

TMZ first reported the cause of death, after his family and talent management only disclosed Sunday that he’d been killed in a “horrible accident” while traveling in Texas with his family.

The chef commanded a following of 2 million across social media, where he posted entertaining videos showing off his creative and eclectic recipes and cooking methods.

He is survived by his wife and 6-year-old daughter.