A 24-year-old man was grazed in the head early Thursday morning while eating at the City Diner on the Upper West Side, police said.

The man was eating with a woman at about 3:45 a.m. when a second man came in a walked right up to him. The two men appeared to know each other and spoke briefly while the suspect ordered food.

The suspect then left the diner on Broadway, near West 90th St. Wearing headphones, he then returned to pay and pick up the order, but all the sudden walked up to the other man and shot him once, grazing him in the head.

The suspect, described as a man in his 20s and about 6-feet tall, then quickly ran out of the diner.

The victim, who is listed in stable condition, got himself to Mount Sinai Hospital, police said.

By Thursday afternoon the diner was open, with at least a third of the two-room dining space's tables full. Multiple Upper West Side residents said they had eaten at the diner in the early morning hours and never expected a shooting like this.

"Occasionally you hear about stuff happening," said Julia Ho, 20, using the example of someone smashing in car windows. Ho added: "but to go into a diner and shoot people is really random."

(With Carla Sinclair)