A federal court has thrown out the civil rights lawsuit filed by the family of the Texas teenager known as “Clock Boy.”

The lawsuit alleged that the city of Irving and Irving school district discriminated against Ahmed Mohamed at Irving MacArthur High School in September of 2015.

Mohamed, a Muslim teenager who was 14 years old at the time, brought a homemade clock to school to show his engineering teacher. But an alarm on the clock went off in his English class and the teacher confiscated it. He was sent to the principal’s office.

CINCINNATI MAYOR APOLOGIZES TO COPS FOR PROCLAMATION HONORING COP KILLER

“A.M. never stated the device was anything other than a clock, never threatened anyone with harm, never claimed to have made a bomb, and never attempted to scare or cause alarm to anyone. When he asked for his parents, he was told that he could not speak with them because he was in the middle of an interrogation,” his attorney argued according to the court's ruling.

The lawsuit claimed Mohamed’s civil rights were violated when he was interrogated at length without his parents and arrested on hoax bomb charges.

When his father finally arrived at the school several hours later, the court documents state he "tried to explain to Officer Howman that A.M. was interested in robotics and created things, but she was unwilling to listen to his explanations."

Police originally said Mohamed was not very forthcoming and the school as concerned that the device was possibly the infrastructure for a bomb. Officers acted in an abundance of caution.

“It was a very suspicious device. We live in an age where you can't take things like that to school. Of course we've seen across our country horrific things happen. We have to err on the side of caution," Irving Police Chief Larry Boyd told FOX 4 in 2015.

The charges against Mohamed were later dropped but the school still suspended him for three days.

Read more at Fox 4 News.