US President Barack Obama has invited a Muslim schoolboy to the White House after he was arrested and dragged off in handcuffs for bringing a homemade clock to class.
Obama congratulated 14-year-old Ahmed Mohamed on his skills and issued a presidential invitation, in what amounts to a pointed rebuke to school and police officials who precipitated his arrest.
The teen was led out of his Texas school after a teacher mistook his homemade digital clock for a bomb, prompting accusations of Islamophobia and an online backlash.
A photo of Ahmed standing in handcuffs while wearing a T-shirt with the US space agency NASA's logo was retweeted thousands of times in a matter of hours and "#IStandWithAhmed" was the top trending hashtag on Twitter.
Among those voicing support for the boy was Hillary Clinton, who tweeted: "Assumptions and fear don't keep us safe - they hold us back. Ahmed, stay curious and keep building."
"My hobby is to invent stuff," the boy told The Dallas Morning News in a video posted on the paper's website that was filmed in his electronics-filled bedroom.
"I made a clock. It was really easy. I wanted to show something small at first ... they took it wrong so I was arrested for a hoax bomb."
Mohamed said he was just trying to impress his teachers when he brought the clock to MacArthur High School on Monday.
But when the alarm went off during class the teacher told him it looked like a bomb and confiscated the clock.
The school called police and Mohamed was taken away in handcuffs amid suspicion he intended to frighten people with the device.
Once released the aspiring inventor, who lives in Irving just outside Dallas, was suspended from school for three days.
Police said on Wednesday (local time) they had determined that Mohamed had no malicious intent and it was "just a naive set of circumstances."
Irving police chief Larry Bond insisted that Mohamed's ethnicity had nothing to do with the police response.
"Our reaction would have been the same either way. That's a very suspicious device," Bond said.
He said all prisoners were handcuffed for their own safety, adding "unfortunately we've had people jump out of cars."
The Council on American-Islamic Relations said the heavy-handed response is particularly suspicious given that Irving Mayor Beth Van Duyne has claimed that Muslims are plotting to impose Sharia law in America.
"This all raises a red flag for us: how Irving's government entities are operating in the current climate," Alia Salem, who directs the council's North Texas chapter, said.