The family of a 12-year-old Muslim middle school student has filed a $25 million federal lawsuit against the East Islip school district, claiming the seventh-grader’s civil rights were violated when school officials forced him to sign a false confession saying he was a terrorist.

The family of Nashwan Uppal, a Pakistani special-needs student from Islip Terrace, filed the suit Monday in U.S. District Court for the Eastern District of New York in Central Islip, claiming school officials forced him to confess, under extreme duress, to a terrorist act and crimes he did not commit, and “that he was a member of ISIS, a vile and infamous terrorist organization.” School officials also ignored repeated and severe incidents of bullying against Nashwan from older students, the court papers stated.

Named as defendants in the suit are East Islip Superintendent John Dolan, East Islip Middle School Principal Mark Bernard and Assistant Principal Jason Stanton. The district declined to comment Tuesday, citing the ongoing litigation.

“This was understandably an extremely traumatic event for Nashwan, his mother and his entire family,” said the family’s attorney David Antwork, of Merrick. “Nashwan, a child with social, language and learning disabilities, was confined, berated, interrogated and forced to falsely confess to horrible things by the school administrators who were supposed to be caring for him and protecting him.”

According to the suit, Nashwan was bullied and harassed on Jan. 6 in the middle school cafeteria by older students who called him a terrorist and asked him when he was going to blow up the school.

The suit said that cafeteria workers failed to notice the bullying and, after being repeatedly harassed, Nashwan said he was a terrorist and “was going to blow up the school fence.”

But court papers say that due to his learning disability, he was mimicking what the older students were saying.

Sign up for The Classroom newsletter. Education on Long Island is changing. Find out how. By clicking Sign up, you agree to our privacy policy.

The next day, Jan. 7, while he was in gym class, Nashwan was called to the principal’s office. The suit claims that Stanton “began yelling and screaming,” and he and Bernard interrogated Nashwan, including asking him if he was “part of ISIS.”

School officials searched his belongings and his locker, and did not call his parents, the court papers said. Stanton ordered him to write a confession, saying that “he was part of ISIS and knew how to make bombs.”

Nashwan, pressured under extreme duress, the court papers said, made a written confession “that he was a terrorist.”

School officials also called Suffolk police to the school, according to the lawsuit. Nashwan’s mother, Nubiasha Amar, was told that Nashwan would be suspended for one week of school for “criminal activity,” court papers said. But the court papers said he was out for a month.

Suffolk police also searched the family’s home and Nashwan’s computer but found nothing, according to the suit.

Police declined to comment Tuesday.

Court papers said the Nashwan and his parents have “suffered severe and extreme emotional distress, including, but not limited to nightmares, sleeplessness, crying, fear, humiliation and stress.”

The suit claims the school district violated Nashwan’s civil rights, discriminating against him based on his race, ethnicity, religion and national origin. It says he was also discriminated against due to his disability, was subject to unlawful search and seizure, and deprived of his rights against self-incrimination, due process and equal protection under the law. School officials also violated the Dignity for All Students Act, intentionally inflicted emotional distress and defamed him, according to the court documents.