20/10/2015 10:42 AM AEDT | Updated 20/10/2015 11:45 AM AEDT

Ahmed Mohamed Visits The White House, Meets Obama

The visit came one month after he was arrested for bringing a homemade clock to school.

Chip Somodevilla via Getty Images
Ahmed Mohamed and President Barack Obama met during White House Astronomy Night.

Ahmed Mohamed, the Muslim teenager who was arrested and sent to juvenile detention last month after bringing a homemade clock to his high school, visited the White House Monday evening following a personal invitation from President Barack Obama.

Ahmed, 14, attended the White House's Astronomy Night, along with other students, teachers, scientists and astronauts, as well as TV personalities like Bill Nye and the stars of "Mythbusters." It's the second time the White House has hosted the event, which includes stargazing on the White House's South Lawn.

Obama and Ahmed met and chatted briefly during the event.

"We have to watch for and cultivate and encourage those glimmers of curiosity and possibility, not suppress them, not squelch them," Obama said at the event. "Not only are the young people's futures at stake, but our own is at stake."

Ahmed also took a selfie with former astronaut John Grunsfeld:

Chip Somodevilla via Getty Images
Ahmed Mohamed poses with former astronaut and NASA Associate Administrator for the Science Mission Directorate John Grunsfeld.

According to the Associated Press, Ahmed toured the National Institute of Standards and Technology's labs before heading to 1600 Pennsylvania Avenue.

Ahmed was arrested at MacArthur High School in Irving, Texas, on Sep. 14 after bringing his clock to school, which he said he did in hopes of impressing some of his teachers. However, the first teacher he showed the homemade clock to told him not to show it to any others. Later, he was pulled out of class, asked if he had intended "to make a bomb" and handcuffed by police.

After his arrest made national news, Obama invited Ahmed -- and his clock -- to visit the White House.

Ahmed, who decided withdraw from his high school, has kept busy in the month since his arrest, attending a Google Science Fair, meeting Sudanese President Omar al Bashir and traveling to Mecca with his family.

Read more on what he's been up to here.

Also on HuffPost:

Photo gallery
Obama Visits The 50 States
See Gallery