A San Antonio father shot a man dead after the man threatened his family with a gun at a Popeyes restaurant on Wednesday (6 December), police said.

A masked gunman reportedly walked into the fast food outlet at around 8.50pm and confronted a family as they were eating and tried to rob them, the San Antonio Police Department said.

According to the Dallas Morning News, the father asked if the man would let them go and the would-be robber agreed.

Police said the man's wife and two of their children were allowed to go but two others were in the bathroom.

As the robber demanded money from the employees, he noticed the father's two children walk out of the bathroom and pointed the gun at them, News 4 reported.

According to police, the children's father, who was carrying a gun, took out his gun and shot the man dead.

KENS 5 reported restaurant employees placed the building on lock down until law enforcement arrived on the scene. The father, a licensed handgun owner, is believed to have shot in defence of others, the Morning News reported.

The attempted robbery suspect has not yet been identified by police.