The mayor of Phoenix apologized on Saturday after videos showed that police officers in the city who had been responding to a report of a shoplifting had drawn their weapons, shouted expletives, and threatened to shoot a man in the face in front of his young children.

The mayor, Kate Gallego, said in a statement that she was “sick” over what she had seen in the videos.

“It was completely inappropriate and clearly unprofessional,” she said. “There is no situation in which this behavior is ever close to acceptable. As a mother myself, seeing these children placed in such a terrifying situation is beyond upsetting.”

The episode has drawn widespread attention as police encounters with civilians have faced heightened scrutiny, which is increasingly augmented by videos captured by bystanders on cellphones or by officers’ body cameras.