John M. Grunsfeld (L), Associate Administrator for the Science Mission Directorate, poses for a selfie with Ahmed Mohamed, 14, the Texas teenager who was arrested after bringing a homemade electronic clock to school, during the second White House Astronomy Night on the South Lawn of the White House in Washington in this October 19, 2015, file photo. REUTERS/Joshua Roberts/Files

DALLAS (Reuters) - The U.S. Justice Department has opened an investigation into a Dallas-area school district where a Muslim teenager was arrested for bringing a homemade clock to school that was mistaken for a bomb, Department of Justice officials in Texas said on Friday.

The arrest of Ahmed Mohamed, 14, a bespectacled ninth-grader who dabbles in robotics and attended high school in Irving, started a social media firestorm, with many saying he was taken into custody because of his religion.

“The Civil Rights Division has an investigation into the Irving School District regarding both harassment and the discipline of students on the basis of race, religion and national origin,” a Justice Department official said.

School district officials were not immediately available for comment.

The Council on American-Islamic Relations, a leading activist group, said the case serves as an example of the climate of hate and manufactured fear around the religion.

Texas mosques have been subject to acts of intimidation in recent weeks, with armed protesters carrying long guns at rallies in front of a mosque in Irving, west of Dallas.

Last month, attorneys for the Mohamed family accused city and school officials of wrongful arrest based on discrimination and demanded a $15 million settlement, or they will file civil lawsuits.

After Mohamed was seen in a NASA T-shirt in handcuffs, the Twitter hashtag #IStandWithAhmed trended globally and was cited in praise by Facebook Chief Executive Officer Mark Zuckerberg, who said: “Having the skill and ambition to build something cool should lead to applause, not arrest.”

Ahmed and his family have moved to Qatar and the teen has accepted an offer from the Qatar Foundation to study at its Young Innovators Program. The announcement of the move came a few hours after he was at the White House for an astronomy night hosted by President Barack Obama.