Texas police arrested a 14-year-old boy after he brought a homemade clock to school earlier this week.

Ahmed Fans

Ahmed Fans

Ahmed Mohamed, who dreams of becoming an engineer, was excited to show his teachers a clock he had made from scratch. Ahmed said that his engineering teacher congratulated him, but when an English teacher saw the clock after it beeped in class, she perceived it as a threat.

"She was like - it looks like a bomb," Ahmed told reporters.

"I built a clock to impress my teacher but when I showed it to her she thought it was a threat to her. I'm very sad that she got the wrong impression of it."

Later in the day, the 9th grader was pulled out of class, and interviewed by senior teachers and policemen at his school in Texas, before being handcuffed and taken to juvenile detention.

Officials at MacArthur High School in Irving alerted police because they thought the device was a "hoax bomb". Police announced on Wednesday that the charges would be dropped.

Ahmed's father Mohamed Elhassan Mohamed, originally from Sudan, thinks this is a case of Islamophobia: "My son's name is Mohamed -- people just think Muslims are terrorists but we are peaceful, we are not that way."

Irving police have rejected this claim, but the incident is being investigated by The Council on American-Islamic Relations.

Social media reacted with outrage and incredulity in support of Ahmed, with thousands of users praising the teen under the hashtag #IstandwithAhmed. High-profile figures such as Facebook CEO Mark Zuckerberg, NASA scientists, pop celebrities and Hilary Clinton tweeted their support.

Ahmed even got an invitation to the White House from President Barak Obama.

"Cool clock, Ahmed. Want to bring it to the White House? We should inspire more kids like you to like science. It's what makes America great," Mr Obama wrote on Twitter.

?ref_src=twsrc%5Etfw

Ahmed, who on Wednesday announced his intention to transfer schools, said he was grateful for the widespread support, and thanked supporters via Twitter.