Student arrested for homemade clock visits White House

Before you go, we thought you'd like these...
14 PHOTOS
NTP: Obama hosts Astronomy Night at White House - Ahmed Mohamed
See Gallery
Student arrested for homemade clock visits White House
President Barack Obama, right, looks up at the moon as he talks with Agatha Sofia Alvarez-Bareiro, left, a high school senior from the Brooklyn borough of New York as Obama prepares to look at the moon at the second-ever White House Astronomy Night on the South Lawn of the White House in Washington, Monday, Oct. 19, 2015. The event brings together students, teachers, astronomers, engineers, scientists, and space enthusiasts for an evening of stargazing. (AP Photo/Susan Walsh)
President Barack Obama, right, shares a laugh with Agatha Sofia Alvarez-Bareiro, a high school senior from the Brooklyn borough of New York as Obama prepares to look at the moon at the second White House Astronomy Night on the South Lawn of the White House in Washington, Monday, Oct. 19, 2015. The event brings together students, teachers, astronomers, engineers, scientists, and space enthusiasts for an evening of stargazing. (AP Photo/Susan Walsh)
WASHINGTON, DC - OCTOBER 19: In and effort to promote science, technology, engineering and mathematics (STEM) education, the White House hosts its second Astronomy Night on the South Lawn October 19, 2015 in Washington, DC. U.S. President Barack Obama hosted 300 scientists, engineers, astronauts, teachers and students for some stargazing. (Photo by Chip Somodevilla/Getty Images)
Irving, Texas student Ahmed Mohamed (R) is seen during the second White House Astronomy Night on the South Lawn of the White House on October 19, 2015 in Washington, DC. Mohamed was arrested for bringing a homemade digital clock to school in September. AFP PHOTO/MANDEL NGAN (Photo credit should read MANDEL NGAN/AFP/Getty Images)
WASHINGTON, DC - OCTOBER U.S. President Barack Obama delivers remarks while standing next to an Extravehicular Mobility Unit (EMU) during the second Astronomy Night on the South Lawn of the White House October 19, 2015 in Washington, DC. Obama hosted 300 scientists, engineers, astronauts, teachers and students for some stargazing. (Photo by Chip Somodevilla/Getty Images)
WASHINGTON, DC - OCTOBER 19: Ahmed Mohamed (C), 14, of Irving, Texas, and his family attend the second Astronomy Night on the South Lawn of the White House October 19, 2015 in Washington, DC. Mohamed was handcuffed and questioned by police last month when he brought a homemade electronic clock to class at MacArthur High School and officials mistook it for a bomb. (Photo by Chip Somodevilla/Getty Images)
WASHINGTON, DC - OCTOBER 19: U.S. President Barack Obama (2nd R) talks with 14-year-old Ahmed Mohamed (L) during the second Astronomy Night on the South Lawn of the White House October 19, 2015 in Washington, DC. Invited to the White House for the science event, Mohamed was handcuffed and questioned by police last month when he brought a homemade electronic clock to class at MacArthur High School in Irving, TX, and officials mistook it for a bomb. (Photo by Chip Somodevilla/Getty Images)
WASHINGTON, DC - OCTOBER 19: Former astronaut and NASA Associate Administrator for the Science Mission Directorate John Grunsfeld (L) poses for a selfie with Ahmed Mohamed during the second Astronomy Night on the South Lawn of the White House October 19, 2015 in Washington, DC. Ahmed Mohamed, 14, was handcuffed and questioned by police last month when he brought a homemade electronic clock to class at MacArthur High School in Irving, TX, and officials mistook it for a bomb. (Photo by Chip Somodevilla/Getty Images)
WASHINGTON, DC - OCTOBER 19: In and effort to promote science, technology, engineering and mathematics (STEM) education, U.S. President Barack Obama delivers remarks while standing next to an Extravehicular Mobility Unit (EMU) during the second Astronomy Night on the South Lawn of the White House October 19, 2015 in Washington, DC. Obama hosted 300 scientists, engineers, astronauts, teachers and students for an evening of stargazing. (Photo by Chip Somodevilla/Getty Images)
WASHINGTON, DC - OCTOBER 19: In and effort to promote science, technology, engineering and mathematics (STEM) education, the White House hosts its second Astronomy Night on the South Lawn October 19, 2015 in Washington, DC. U.S. President Barack Obama hosted 300 scientists, engineers, astronauts, teachers and students for some stargazing. (Photo by Chip Somodevilla/Getty Images)
WASHINGTON - OCTOBER 7: In this handout provided by The White House, President Barack Obama looks through a telescope during an Astronomy Night event on the South Lawn of the White House October 7, 2009 in Washington, DC. (Photo by Chuck Kennedy/The White House via Getty Images)
Ahmed Mohamed (L), a 14-year-old high school student who was arrested after he brought a homemade clock to his Irving, Texas high school to show his teachers and was later accused of having a 'hoax bomb', stands with his uncle Aldean Mohamed (R) during a press conference on Capitol Hill in Washington, DC, October 20, 2015. Ahmeds detention played into national debates about Islam, immigration and ethnicity. Ahmed 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. AFP PHOTO/JIM WATSON (Photo credit should read JIM WATSON/AFP/Getty Images)
Ahmed Mohamed (C), a 14-year-old high school student who was arrested after he brought a homemade clock to his Irving, Texas high school to show his teachers and was later accused of having a 'hoax bomb', stands with his father Mohamed Elhassan Mohamed (L), uncle Aldean Mohamed (R) and their family lawyer Ron Price (2nd R) after a press conference on Capitol Hill in Washington, DC, October 20, 2015. Ahmeds detention played into national debates about Islam, immigration and ethnicity. Ahmed 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. AFP PHOTO/JIM WATSON (Photo credit should read JIM WATSON/AFP/Getty Images)
of
SEE ALL
BACK TO SLIDE
SHOW CAPTION +
HIDE CAPTION

WASHINGTON (AP) — Ahmed Mohamed, the Texas teenager arrested after a homemade clock he brought to school was mistaken for a bomb, capped a whirlwind month with a visit to the White House on Monday.

Ahmed got a personal invitation from President Barack Obama for "Astronomy Night." The two met and chatted briefly during Monday night's event.

EARLIER: Clock-building teen Ahmed Mohamed set to attend White House event

Earlier Monday, Ahmed said he was grateful for the president's support and said he's OK with the nickname that so many have given him over the past few weeks — "clock kid."

He said the lesson of his experience is: "Don't judge a person by the way they look. Always judge them by their heart."

Last month, Ahmed brought the clock to his school to show a teacher, but another teacher thought it could be a bomb. The school contacted police, who ultimately chose not to charge Ahmed with having a hoax bomb, though he was suspended from school.

Obama subsequently Tweeted an invitation to Ahmed and said the U.S. should inspire more kids like him to enjoy science.

Ahmed's family is looking at several options for a new school. He hopes to eventually go to the Massachusetts Institute of Technology and become an engineer.

The White House invitation brought some backlash. Republican presidential candidate Ted Cruz complained that Obama didn't give law enforcement officials the same respect he's giving Ahmed. White House spokesman Josh Earnest said Monday the president has made clear in many settings the respect he has for law enforcement officers.

Ahmed said he has visited Google and Facebook, along with other companies and institutions in recent weeks. He also visited with the president of Sudan, Omar al-Bashir, which has prompted some criticism because al-Bashir is wanted by International Criminal Court on charges of genocide and war crimes for atrocities linked to the Darfur fighting. Advisers deflected a question on that topic and instructed Ahmed to not answer.

Ahmed posed for pictures with NASA astronaut Alvin Drew shortly before Obama addressed the students on the South Lawn, and he got to introduce himself to the president when Obama waded out toward the audience to shake hands with visitors after his speech.

Obama told the crowd that NASA was developing the capabilities to send humans to Mars in the 2030s.

"That means some of the young people who are here tonight might be working on that project," Obama said. "Some of you might be on your way to Mars. America can do anything."

The students visiting the South Lawn of the White House on Monday night got the chance to explore samples of rocks from the moon, Mars and various meteorites. They met with astronauts and peered at the planets and stars through telescopes.

See Ahmed's reaction to visiting the White House:

Ahmed Mohamed Talks About Meeting Obama


More on AOL.com:
Webb to drop bid for Democratic presidential nominee: Fox
At 100, woman still working 11 hours a day, 6 days a week
Michelle Obama video previews Justin Bieber's new song 'Sorry'
Read Full Story

People are Reading