A 12-year-old boy pulled a gun on a classmate because she refused to give him a McDonald's chicken nugget, New York City police said.

According to WPIX-TV, the incident occurred Tuesday in Harlem after the female classmate bought the food at a McDonald's. 

Police said the boy approached the girl and asked for a McNugget, but she said no. 

He then is alleged to have pulled a gun out on the subway and again demanded a nugget.

Police said the girl, 13, smacked the gun away from her head and the boy fled.

The boy was taken into custody the next day and faces an attempted robbery charge. 

Krispy Kreme Employee Writes 'Black Lives Matter' on Officer's Order

Report: Obama Family Dog, Sunny, Bit 18-Year-Old White House Guest

Beware Netflix Customers! Email Scam Targeting Users' Personal Info

Amazon Announces Creation of 100K Full-Time US Jobs by 2018