A US District Court judge has dismissed the lawsuit filed by the father of Ahmed Mohamed, a boy who brought a homemade clock to school and then was arrested on charges of bringing a hoax bomb to the school.

Mohamed was a 14-year-old freshman when the incident happened at his high school in Irving, Texas in September 2015. The charge against Mohamed was dropped, and the boy gained public support from President Obama, who invited him to the White House after saying that "we should inspire more kids like you to like science."

Mohamed's father, Mohamed Elhassan Mohamed, filed a lawsuit against the Irving Independent School District, school principal Daniel Cummings, the City of Irving, and police officers Robin Howman, Charles Taylor, Jeff Mitchell, and Richie Miller. The lawsuit alleged that Mohamed, an African-American Muslim, was discriminated against based on his race and religion.

Motions to dismiss the case were already granted in May 2017, but the complaint was amended. A new decision dismissing the amended complaint was issued Tuesday by Judge Sam Lindsay of US District Court for the Northern District of Texas. The judge dismissed claims against all defendants with prejudice and said that "no claims remain in this action."

The lawsuit "does not contain sufficient factual allegations from which the court can reasonably infer that A.M. [Ahmed Mohamed] was subject to unequal disciplinary treatment based on his religion or race," the judge wrote.

"Mr. Mohamed has not identified a specific policy, or adequately alleged a custom or practice, that was the moving force behind any alleged violation of A.M.'s Fourth Amendment rights," the judge also wrote.

Excessive force claims dismissed

Excessive force claims against the police officers were dismissed because the boy's "alleged injuries are, at best, de minimis," the ruling said.

The lawsuit alleged that officers "pulled A.M. forcefully out of his chair, yanked his arms up behind his back so far that his right hand touched the back of his neck, causing a lot of pain."

However, "Minor, incidental injuries that occur in connection with the use of handcuffs to effectuate an arrest do not give rise to a constitutional claim for excessive force," the judge wrote.

The officers also had "arguable probable cause," justifying the use of reasonable force to make the arrest, the ruling said. It was alleged "that A.M. brought to school a device in a small box containing a circuit board, wires, and a timing display, repeatedly disobeyed a teacher who had told him to keep the device in his backpack, displayed and activated the device during class after being told to keep it in his backpack, and was less than forthcoming when he was questioned about the device," the ruling said.

Even when viewing the allegations in the light most favorable to the boy, "and given that these events transpired in a school setting, the court determines that the Officer Defendants had a basis to believe to a fair probability that a hoax bomb violation had occurred, providing them with at least arguable probable cause to arrest" Mohamed, the ruling said.

The Mohamed family now lives in Qatar. The City of Irving said in a statement that it is "extremely pleased by the court's ruling, which supports the justifiable actions taken by the officers in the matter," according to The Dallas Morning News. The school district said it was pleased that the judge's ruling found "no basis to the claim that [the school] discriminated against this student on the basis of race or religion."