Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Police in Texas said Wednesday that charges will not be filed against a 14-year-old Muslim high school student who was arrested after he brought in a homemade clock that a teacher said looked like a bomb.

The arrest drew an outcry on social media. Hundreds of thousands of people used the hashtag #IStandWithAhmed — and President Barack Obama invited the teen to the White House.

Ahmed Mohamed, who is Sudanese-American, was arrested on Monday in the Dallas suburb of Irving after he took the clock to his high school.

He told The Dallas Morning News that he had been in robotics club in middle school, and he wanted to show his new teacher what he could do.

Ahmed Mohamed, A 14-year-old North Texas student, appears in handcuffs, after his arrest on charges of making a “hoax bomb.” Courtesy of Mohamed Affan

Ahmed said the teacher told him the electronic clock was nice, then added: I would advise you not to show any other teachers.”

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

When the clock’s alarm went off during class, Ahmed showed it to his English teacher, who said it looked like a bomb and then confiscated it, the newspaper reported. The teen was hauled into the principal’s office and arrested by police.

As news of the arrest spread Wednesday, Google weighed in with an invitation to its Science Fair this weekend. Facebook’s Mark Zuckerberg said he wanted to meet Ahmed and suggested he drop by.

And the president said the clock was cool.

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 (@POTUS) September 16, 2015

According to NBC Dallas-Fort Worth, Ahmed was questioned, handcuffed and taken to Irving police headquarters for interrogation, fingerprinting and mug shots, even though he repeatedly insisted that it was a clock.

"Clearly, there were disassembled clock parts in there, but he offered no more explanation than that," Irving Police Officer James McLellan told NBC DFW.

Ahmed told NBC Dallas Fort Worth that his family surname repeatedly came up in police questioning. "I really don’t think it’s fair, because I brought something to school that wasn’t a threat to anyone. I didn’t do anything wrong. I just showed my teachers something and I end up being arrested later that day," he said.

Ahmed and us at the Robotics Competition in Dallas #IStandWithAhmed pic.twitter.com/SkI3I8DDo8 — مرام (@queen_hijabi_) September 16, 2015

Mohamed's family suspects that the arrest was related to his last name and Sept. 11. Irving Mayor Beth Van Duyne was in the media spotlight earlier this year for a bill that Muslims say targeted their community.

RELATED: Asian Americans React to Alabama Mistrial #AfterSeptember11

“This all raises a red flag for us: how Irving’s government entities are operating in the current climate,” Alia Salem of the Council on American-Islamic Relations (CAIR) told The Dallas Morning News. “We’re still investigating, but it seems pretty egregious.”

In a statement Wednesday from the ACLU of Texas, executive director Terri Burke said, "Ahmed Mohamed’s avoidable ordeal raises serious concerns about racial profiling and the disciplinary system in Texas schools. Instead of encouraging his curiosity, intellect, and ability, the Irving ISD saw fit to throw handcuffs on a frightened 14 year-old Muslim boy wearing a NASA t-shirt and then remove him from school."

Thank you fellow supporters. We can ban together to stop this racial inequality and prevent this from happening again pic.twitter.com/fBlmckoafU — Ahmed Mohamed (@IStandWithAhmed) September 16, 2015

Supporters took to Twitter to offer their support for Mohamed with the hashtag #IStandWithAhmed, which trended overnight, having been tweeted more than 520,000 times by early Wednesday afternoon.

Assumptions and fear don't keep us safe—they hold us back. Ahmed, stay curious and keep building. https://t.co/ywrlHUw3g1 — Hillary Clinton (@HillaryClinton) September 16, 2015

Some noted how differently white children inventors are treated, and lamented the costs of continuing Islamophobia, while others invited Mohamed to discuss college and career opportunities with them.

#IStandWithAhmed because when my 1-year-old Muslim American boy grows up and builds a badass clock, I want him celebrated, not arrested. — Wajahat Ali (@WajahatAli) September 16, 2015

#IStandWithAhmed because each of us should help mentor, support, advise, & do outreach 4 kids who want to learn & be creative #k12 #STEM — Angela Gibson (@AgilistaAG) September 16, 2015

Infact, I think the whole of JPL would welcome Ahmed with open arms. #IStandWithAhmed https://t.co/9FU3ZlHkCi — Doug Ellison (@doug_ellison) September 16, 2015

Hey Ahmed, give me a call in a couple years. We could always use smart, curious & creative people. https://t.co/02a4feMrk5 — Bobak Ferdowsi (@tweetsoutloud) September 16, 2015