A US judge has thrown out a discrimination case brought by the family of a Muslim student whose homemade clock was mistaken for a bomb.

In 2015 Ahmed Mohamed was arrested in a suburb of Dallas, Texas, after his teacher said the clock looked like an explosive device.

Photos of the 14-year-old’s arrest sparked a public outcry.

But on Thursday a Texas judge ruled there was no evidence of racial or religious discrimination.

“Plaintiff does not allege any facts from which this court can reasonably infer” that Irving Independent School District employees “intentionally discriminated” against Ahmed Mohamed, wrote US District Judge Sam Lindsay in his ruling.