A Queens high schooler who tried to gather hundreds of kids in the school lobby for a flash-mob dance of the viral “Harlem Shake” got rattled and rolled instead.

Seventeen-year-old Arnis Mehmetaj was arrested, suspended for five days and got his senior privileges nixed for organizing Friday’s attempted video shoot at Forest Hills HS — even though he tried to call it off at the last minute.

The senior was even taken to the local precinct station house and issued a desk ticket for disorderly conduct — just for trying to join a dance craze that’s been sweeping the globe. “It was innocent,” said senior Angie Lora. “It wasn’t meant to be harmful.”

Students at a handful of other city high schools have managed to pull off fun and lively versions of the popular dance video without a hitch — and even with apparent administrator approval.

This includes the brainy kids at Stuyvesant HS — who cleverly recorded theirs on the Manhattan school’s indoor escalators — and Bronx Science HS. Even the kids at the Upper East Side private-school Dalton have done it.

Education officials said several Forest Hills students besides Mehmetaj were also disciplined.

In response, kids at the mammoth 3,000-pupil school immediately created an online petition questioning the harsh punishment for what amounted to a lighthearted prank gone awry.

“There was no harm. It’s crazy the way the school reacted,” said 17-year-old senior Edwin Silva.

He said school officials made him delete videos and photos from his cellphone, as well as take down posts from Facebook and Twitter.

Successful “Harlem Shake” high-school videos feature scenes of calm and normal-looking student life that — timed with a jolt in the soundtrack — transform into mobs of costumed students going bonkers.

But Forest Hills HS students admitted their attempted impromptu version was a dud.

“The idea behind the ‘Harlem Shake’ was a good one,” they wrote in the petition, which has been taken down. “It could have used a lot more planning and careful thinking, but it was a good one.”

Students also said Mehmetaj frantically tried to pull the plug an hour before the meet-up, but word of the event had spread too far.

Instead of jumping to the dance craze that finally superceded “Gangnam Style,” students simply swarmed the lobby and whooped it up for a while, then dispersed.

Late yesterday, Mehmetaj’s father, Kapllan, told The Post that school administrators called him and reversed course on his son’s punishment — including nixing the five-day suspension.

“Everything is perfect. Everything is how it was before,” he told The Post.

He emphasized that his son had “never” gotten in trouble before.

“The boy is a very good student — he’s the best,” said Mehmetaj.

Additional reporting by Jessica Simeone