The government contested a former Stanford University student's assertion that she was wrongly placed on a no-fly list for seven years in court despite knowing an FBI official put her on the list by mistake because he checked the "wrong boxes" on a form, a federal judge wrote today.

The agent, Kevin Kelley, based in San Jose, misunderstood the directions on the form and "erroneously nominated" Rahinah Ibrahim to the list in 2004, the judge wrote.

"He checked the wrong boxes, filling out the form exactly the opposite way from the instructions on the form," U.S. District Judge William Alsup wrote (.pdf) today.

The decision makes Ibrahim, 48, the first person to successfully challenge placement on a government watch list.

Much of the federal court trial, in which the woman sought only to clear her name, was conducted in secret after U.S. officials repeatedly invoked the state secrets privilege and sought to have the case dismissed.

Attorneys working pro bono spent as much as $300,000 litigating the case and $3.8 million in attorney's fees.

The judge issued a brief ruling last month declaring that the Malaysian woman was a victim of a bureaucratic "mistake." The judge’s full opinion was released today.

Ibrahim’s saga began in December 2005 when she was a visiting doctoral student in architecture and design from Malaysia. On her way to Kona, Hawaii to present a paper on affordable housing, Ibrahim was told she was on a watch list, detained, handcuffed and questioned for two hours at San Francisco International Airport.

She sued and federal authorities fought her all the way.

The December 5-day trial was shrouded in extraordinary secrecy, with closed court hearings and non-public classified exhibits.

The agent testified to his bungle in closed court.