Washington: President Barack Obama has invited to visit the White House a Sudanese-American Muslim teenager who brought a clock he made to high school in Texas, but instead of praise it landed him in jail for making a "fake bomb".
In the end, however, the incident brought Ahmed Mohamed, who plans to become an engineer, an invitation from Obama and one from Mark Zuckerberg to stop by Facebook.
"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," Obama's Twitter account tweeted.
Mohamed, 14, went to his high school in Irving, Texas, on Monday to show his teacher a digital clock he'd made from a pencil case.
Instead, an English teacher reported Ahmed's project, which prompted school officials to call police.
"They arrested me and they told me that I committed the crime of a hoax bomb, a fake bomb," he later explained.
Ahmed repeatedly told police that what they believed to be a hoax bomb was actually a clock.
He said they would not allow him to contact his father, Mohamed Elhassan Mohamed, who ran for president of Sudan earlier this year.
Police announced on Wednesday that the teen will not be charged.
The White House then invited Ahmed to Astronomy Night in October, an annual event that brings together astronauts, scientists and other professionals.
"They'll share their experiences and spend an evening stargazing from the South Lawn. We think Ahmed will fit right in," wrote Obama's Chief Data Scientist, D.J. Patil, an Indian-American.
He also reminded Ahmed, who was seen wearing a NASA shirt in a photo of his arrest: "Don't forget your NASA shirt. I'll be wearing mine."
The incident also brought Ahmed invitations from top tech companies. Google invited him on Twitter to this weekend's Google Science Fair.
And Facebook founder Mark Zuckerberg invited the teen to stop by his company in a statement posted on his page.
"Having the skill and ambition to build something cool should lead to applause, not arrest. The future belongs to people like Ahmed.
"Ahmed, if you ever want to come by Facebook, I'd love to meet you. Keep building," Zuckerberg wrote.
Asked about Ahmed's arrest during the second tier presidential debate, Louisiana's Indian-American Governor Bobby Jindal brushed aside the notion that there's discrimination in the US.
"We don't discriminate based on colour of skin or their creed" in the US, he said in response to a question about where the line between national security and discrimination lies.
When pressed further to talk specifically about Ahmed's arrest, Jindal said he didn't think a 14-year-old "should ever get arrested for bringing a clock to school".
Jindal also said he thought Christians were the real victims of discrimination in the US.
(Arun Kumar can be contacted at email@example.com)