New details made public this week in the case of a Muslim scholar banned from traveling to the United States reveal that a federal agent in the US single-handedly made a “monumental error” that sparked a nearly decade-long legal fight.

Back in December, US District Judge William Alsup released a brief summary explaining that Rahinah Ibrahim, a former doctorate student at Stanford University, had accidentally been added to a federal no-fly list. This week, though, Alsup issued a much longer decision — albeit a heavily redacted one — in which he admits that a Federal Bureau of Investigation agent literally let one small mistake occur, incidentally barring Ibrahim from travel to the US since 2005 as a result.

As RT has reported extensively before, Ibrahim was trying to board a flight from San Francisco, California to Hawaii with her teenage daughter nine years ago when she was detained by authorities, interrogated for hours and told she appeared on a no-fly list. Ultimately she was cleared for air travel, but two months later was instructed that her visa had been revoked due to a US terrorism law. She has spent much of the last nine years in Malaysia, communicating with colleagues at Stanford and across the US using the phone and internet.

In December, Alsup wrote that Ibrahim is "entitled by due process to a ... remedy that requires the government to cleanse and/or correct its lists and records of the mistaken information,” and agreed that the rules surrounding adding and maintaining names on federal watchlists include serious hurdles that prevent innocent people from learning about their status. Both the judge and the government admitted at trial that Dr. Ibrahim did not and does not pose a threat to America.

But in the latest 38-page order penned by Alsup out of the US District Court for the Northern District of California, the judge adds that Ibrahim’s woes may never have occurred had an FBI agent not checked the wrong box while filling out paperwork almost a decade ago.

Ahead of Ibrahim’s planned flight to Hawaii, the order acknowledges, she met with FBI Special Agent Kevin Michael Kelley, who at that same time was involved in what the court called a “mosque outreach program” that provided “a point of contact for mosques and Islamic Associations” with federal agents. Kelly’s role involved recommending people to be added to various government watchlists, and according to the court he made a mistake while doing paperwork regarding Ibrahim.

“Agent Kelley misunderstood the directions on the form and erroneously nominated Dr. Ibrahim to the TSA's no-fly list [redacted],” Judge Alsup admitted this week. “He did not intend to do so. This was a mistake, he admitted at trial. He intended to nominate her to the [longer redaction]. He checked the wrong boxes, filling out the form exactly the opposite way from the instructions on the form. He made this mistake even though the form stated, ‘It is recommended the subject NOT be entered into the following selected terrorist screening databases.’”

“Based on the way Agent Kelley checked the boxes on the form,” the judge continued, Ibrahim “was placed on the no-fly list [longer redaction]. So, the way in which plaintiff got on the no-fly list in the first place was human error by the FBI.”

Ibrahim began fighting the US Department of Homeland Security shortly after the incident first started to unfold, and a brief trial was held last year largely behind closed doors in California. Only then though, Alsup acknowledged, did Kelley come to hear about his own mistake.

“FBI Agent Kelley made a plain, old-fashioned, monumental error in filling out the VGTOF nomination form for Dr. Ibrahim,” the judge wrote. “He checked the boxes in exactly the opposite way from the instructions on the form, thus nominating Dr. Ibrahim to the no-fly list (against his intention). This was the start of all problems in Dr. Ibrahim’s case. Surprisingly, Agent Kelley first learned of this mistake eight years later at his deposition.”

But because of that mistake, attorneys working pro bono for Ibrahim incurred a reported $3.8 million in legal fees, as well as $300,000 in litigation costs while working on that case. Also of issue, of course, is how Ibrahim was blacklisted from returning to the US during the duration of her ordeal.

Elsewhere, Alsup called Kelley’s error "conceded, proven, undeniable and serious,” and explained that even minor issues could have major repercussions on a person once entered in the thoroughly-interconnected government computer systems.

“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,” he wrote.

A Department of Justice spokesperson declined a request to comment from Reuters after Alsup’s order was published this week. Ibrahim is currently employed as the dean of architecture at Universiti Putra Malaysia.