MANSFIELD, Texas — Police shot a man who they say pulled out a gun and began waving it around at an IHOP restaurant early Tuesday morning. 

Police were called at about 2:30 a.m. to the restaurant at Highway 287 and Debbie Lane. Police said the man was a customer at the restaurant when he pulled a gun out, alarming other customers and employees. 

The restaurant was safely evacuated out the back door of the restaurant.

The man also followed, but police said an officer placed himself between the suspect and the customers and employees. 

According to police, the man didn't follow police commands, and that's when an officer shot him. He was sent to the hospital. Police said he is out of surgery in critical condition. His identity has not been released at this time. 

A veteran officer fired shots, police said. 

This is a developing story. Check back for new information. Download our free WFAA app to stay up-to-date on all news stories in the Dallas-Fort Worth area.