An East Harlem student was allegedly held at gunpoint by her 12-year-old classmate who demanded that she give him a McDonald's chicken nugget.

The New York Police Department (NYPD) told ABC 7 that it was the boy's second attempt to get a McNugget from the girl.

Police said the incident unfolded at a McDonald's along Third Avenue and East 103rd Street on Tuesday.

An East Harlem student was allegedly held at gunpoint by her 12-year-old classmate who demanded that she give him a McDonald's chicken nugget. Police said the incident unfolded at a McDonald's (pictured) along Third Avenue and East 103rd Street on Tuesday

When he asked her for a McNugget, she refused and walked away. Police said the boy allegedly followed the girl into the 103rd Street No 6 subway station (file photo). He then preceded to point a gun at the girl's head and asked for a McNugget

When he asked her for a McNugget, she refused and walked away.

Police told ABC that the boy allegedly followed the girl into the 103rd Street No 6 subway station.

He then preceded to point a gun at the girl's head and asked for a McNugget, police said.

The girl, whose age hasn't been revealed, smacked the gun away and told the boy to leave her alone.

Police told the station that the girl was unharmed and boarded the train, where she saw the boy showing another student the gun.

The girl reported the incident to school officials the next day.

Police took the boy into custody and he was arrested as a juvenile for attempted robbery, according to NBC New York.

As of Thursday night, authorities hadn't specified if the child had been released.