The Queensland student accused of throwing a sandwich at the prime minister says he is innocent.

Kyle Thomson, 16, was among a group of teens who jeered at Julia Gillard during a visit to Marsden State High School, south of Brisbane, on Wednesday morning.

A sandwich was hurled in the direction of Ms Gillard, but it missed her.

Kyle was accused of throwing the sandwich and has been suspended from school for 15 days.

He denied the allegations, telling the Nine Network he was instead trying to stop another student from throwing the sandwich.

"I hit the sandwich out of the kid's hand because he threw it," he said.

"There was another one, so I hit it out of his hand."

His mother told Nine she believed her son's story.

She said the incident had been blown out of proportion and her son did not deserve to be suspended.