A federal judge has dismissed a discrimination lawsuit brought by the family a Muslim student who was arrested for bringing a homemade clock to school that officials believed to be a bomb.

A federal judge has dismissed a discrimination lawsuit brought by the family a Muslim student who was arrested for bringing a homemade clock to school that officials believed to be a bomb, saying the student's attorneys failed to prove he was treated differently based on his race or religion.

In September 2015, Ahmed Mohamed, an avid hobbyist who was 14 at the time, assembled the clock using a circuit board and digital display and proudly brought the clock to school to show to his teachers. One of his teachers heard the device beeping and brought Mohamed to the principal's office. He was then arrested and suspended for three days.

Mohamed's arrest sparked a social media firestorm over his treatment, with supporters alleging he faced discrimination because of his religion and ethnicity. Users dubbed Mohamed "clock boy" and expressed support with the hashtag #IStandWithAhmed. Mohamed was among the guests invited to the White House for an astronomy event and spoke with President Obama several weeks after his arrest.

Mohamed Mohamed, the student's father, filed a federal lawsuit in August 2016 against the Irving Independent School District (IISD), MacArthur High School principal Daniel Cummings and the city of Irving, Texas, alleging officials violated the boy's civil rights by imposing a 3-day suspension for bringing the clock to school.

On Thursday, Judge Sam Lindsay of the U.S. District Court for the Northern District of Texas granted the defendants' motion to dismiss the lawsuit, saying the plaintiffs had failed to prove officials discriminated against Mohamed.

In his ruling, Lindsay dismissed claims against the city and the school district, writing that the court could not "reasonably infer that any IISD employee intentionally discriminated against [Mohamed] based on his race or religion."

He also dismissed the claim against Cummings, the principal, who Mohamed's team said violated his civil rights and treated the boy unfairly. Lindsay wrote the plaintiff's complaint "does not allege that [Cummings] treated [Mohamed] differently than other similarly situated students, and that the unequal treatment was based on religion or race."

Lindsay gave the plaintiffs a deadline of June 1 to file an amended complaint to support the allegations he wrote were "factually deficient." Susan Hutchison, an attorney representing Mohamed, told CBS News they plan to do so.

Lawyers representing the school district and Cummings told CBS News the "court recognized the challenging situations faced by the individuals who serve our communities in public schools."

"The opinion confirms that there was no suggestion of discriminatory intent by any school district employee," attorneys Kathryn Long, Carlos Lopez and Melisa Meyler said.