Obama invite comes after Texas boy was arrested when his homemade clock was mistaken for a bomb by teachers and police.

US President Barack Obama has issued a White House invitation to a Muslim schoolboy who was arrested for bringing a homemade clock to school.

Ninth-grade high school student Ahmed Mohamed from Irving, Texas, was arrested on Monday after his teachers reported him to the police for making a clock , which they said resembled a bomb.

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. — President Obama (@POTUS44) September 16, 2015

The arrest prompted outrage with thousands expressing their anger at authorities for arresting a 14-year-old boy over his school project.

Social media users rallied behind the teen using the hashtag #IStandWithAhmed, which has picked up more than 500,000 mentions on Twitter so far, according to analytics site Topsy, and continues to rise rapidly.

The story also ranked highest on the user-generated curation website, Reddit.

Police have said they will not charge Mohamed but he told reporters on Wednesday that he remains suspended from school until Thursday.

Many of the comments cited Mohamed’s religious and ethnic background as the probable cause of his arrest, a viewpoint shared by the largest Muslim civil advocacy group in the US.

Ibrahim Hooper, the spokesman for the Council on American-Islamic Relations (CAIR), told Al Jazeera that it was “obvious” the school boy’s religion had played a role in his arrest.

“We believe the arrest would not have occurred if the student had not been Muslim … the school’s reaction and that of the police stems from the fact that he is a Muslim,” Hooper said.

“It is a symptom of growing Islamophobia that a 14-year-old was handcuffed and dragged away for doing a science project.”

Widespread support

Mohamed, who is of Sudanese background, drew support from a number of high profile African-American personalities including talk-show host Montel Williams and rapper Talib Kweli Greene.

https://twitter.com/TalibKweli/status/644153709405044736

https://twitter.com/Montel_Williams/status/644128772254371840

In a Facebook post, Williams suggested previous anti-Islamic statements made by Irving’s mayor, Beth Van Duyne, had played a role in stirring up anti-Muslim sentiment in the area.

“She [Van Duyne] bought into a conspiracy theory that what is actually a faith-based voluntary mediation panel … was some sort of attempt to impose Sharia law. She’s now become a hero of the paranoid far right,” Williams wrote.

As the hashtag spread on Twitter a number of NASA scientists gave their backing to Mohamed, including astronaut Chris Hadfield, and systems engineer Bobak Ferdowsi.

Ferdowsi said a similar incident could have put him off working for NASA.

Hi @IStandWithAhmed ! I'd love you to join us for our science show Generator in Toronto on 28 Oct. There's a ticket waiting for you. — Chris Hadfield (@Cmdr_Hadfield) September 16, 2015

I can't imagine if be working @nasa today if anything like this had ever happened to me. http://t.co/OajWwPXchB #IStandWithAhmed — Bobak Ferdowsi (@tweetsoutloud) September 16, 2015

Technology giant Google also weighed in on the issue, inviting Mohamed to a science fair, and asking him to bring his clock.

https://twitter.com/googlescifair/status/644219471469629440

Many others on Twitter drew comparisons between how US authorities treated white people who carried arms and how they treated black youth like Mohamed, who were involved in benign activities.

Both of these photos were taken in Texas. Let that sink in for a moment.#IStandWithAhmed pic.twitter.com/NQCZ9rW2lw — Muhammad Shehroze (@ShehrozeSays) September 16, 2015

https://twitter.com/BUCKVBVRNES/status/644136300925321217

One user poked fun at US police for arresting a child for carrying something as harmless as a clock.

Irving police dropped the case against the teen on Wednesday afternoon.

Follow Shafik Mandhai on Twitter: @ShafikFM