A 20-year-old attempting to rob a Waffle House pointed his gun at the wrong people early Monday, police say.

A police officer and a security guard, both off-duty, helped thwart the would-be criminal.

Wearing a black bandanna over his face and a hoodie, Ashton Macafee walked into the south Fulton County diner in the 4300 block of Jonesboro Road shortly before 2 a.m. brandishing a handgun and demanding money, said Detective Gloria Hodgson with Union City police.

“Nobody move and open the cash register,” Macafee allegedly said.

After his demand, Macafee pointed a gun at a man seated at a booth, according to police. That man, off-duty Atlanta police Officer Jonathan Sutton, couldn’t reach for his service weapon.

But the man seated next to Sutton, an off-duty security guard, fired two shots, police said. The security guard, identified as Evans Chad Pollard, shot Macafee.

“I felt that not only my life, but everyone’s life was in danger, so I had to do what I had to do,” Pollard said Monday afternoon.

Pollard and Sutton, childhood friends, then waited until Union City officers arrived to make sure Macafee didn’t attempt to leave.

“Everybody was scared and when I eliminated the threat, everyone felt calm,” Pollard said. “He came in and I did what I could.”

Macafee was taken to Grady Memorial Hospital for treatment, police said. His condition was not known late Monday.

No other injuries were reported.

— Staff writer Mike Morris contributed to this report.