The US government hid an egregious clerical error that placed a Malaysian Stanford University student on the TSA’s no-fly list and prompted a nine-year effort to clear her name, according to a federal ruling released to the public Thursday.

FBI Agent Michael Kelly “misunderstood the directions” on a form, leading him to “erroneously” check boxes that flagged Rahinah Ibrahim for the no-fly list in 2004, the ruling states. Kelly made that error despite a note specifically recommending Ibrahim “NOT be entered” into the terrorist screening database. Ibrahim belonged to a professional organization (Jemaah Islah Malaysia) with a similar-sounding name to a designated terrorist group (Jemaah Islamiyah).

“This was no minor human error but an error with palpable impact, leading to the humiliation, cuffing, and incarceration of an innocent and incapacitated air traveler,” wrote US District Judge William Alsup.

The government at trial conceded that Ibrahim poses no threat to national security.

Ibrahim’s suit—originally filed in 2006—is the first challenge to a no-fly list designation to see trial. As Wired’s David Kravets notes, her trial “was conducted in secret after US officials repeatedly invoked the state secrets privilege and sought to have the case dismissed.”

Ibrahim learned she was on the list in January 2005 at the United Airlines counter at San Francisco International Airport. Intending to travel to Hawaii for a conference, she was instead cuffed, arrested and held for two hours before being released. Despite being told her name was taken off the no-fly list, Ibrahim boarded a plane to Hawaii the next day with a specially marked red pass that placed her on a list for additional screening.

In the following years, the federal government revoked Ibrahim’s visa, rejected two applications for reinstatement, and barred her daughter, a US citizen, from traveling to the states to attend her trial.

Judge Alsup wrote it is “reasonable” to suggest Ibrahim’s subsequent visa troubles stemmed from Agent Kelly’s original mistake. He wrote, “Once derogatory information is posted to the Terrorist Screening Database, it can propagate extensively through the government’s interlocking complex of databases, like a bad credit report that will never go away.”

The judge ordered federal officials to remove or correct all records related to Kelly’s error and point out the specific legal justifications for denying Ibrahim’s visa applications in 2009 and 2013.

Ibrahim eventually received a doctorate from Stanford University and currently serves as dean of design and architecture at Universiti Putra Malaysia. She has been using Skype and e-mail to coordinate with US colleagues.

Photo: Rahinah Ibrahim (University Putra Malaysia)