Steve Pope AFP/Getty

Ahmed Mohamed ran into trouble when he brought a clock he designed himself to school, but he’s more than welcome to bring it to the White House.

The 14-year-old Dallas-area student was arrested Monday because authorities suspected the clock could be a fake bomb. As news of the incident spread over the Web, President Obama tweeted his support for the student Wednesday—and included a special invitation.

“Cool clock, Ahmed,” Obama tweeted. “Want to bring it to the White House? We should inspire more kids like you to like science. It's what makes America great.”

Hillary Clinton also tweeted her support for Mohamed on Wednesday.

“Assumptions and fear don't keep us safe—they hold us back,” she said. “Ahmed, stay curious and keep building.”

Mohamed brought the digital clock, which he’d fashioned from a pencil case, into his high school in Irving, Texas, on Monday to show his teacher. But the school called the police, and he was arrested.

"They arrested me and they told me that I committed the crime of a hoax bomb, a fake bomb," he told WFAA after he was released.

Shortly after Obama tweeted his support, White House press secretary Josh Earnest told reporters that Mohamed’s arrest should be a “teachable moment” for the country about “pernicious stereotypes.”

“The president, like many of us, was struck by the news reports of this particular incident,” Earnest said Wednesday. “America’s best teachers and our best schools nurture the intellectual curiosity of our students,” and in this instance, “it’s clear that at least some of Ahmed's teachers failed him.”

This post has been updated to include comment from White House press secretary Josh Earnest.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.