An 89-year-old peace activist who refused to fill out the census because of its link to a U.S. military contractor is not guilty of violating the Statistics Act, a Toronto judge decided today.

Audrey Tobias, who faced jail time if she had been convicted, argued she didn't file her 2011 census because it is processed using software from Lockheed Martin.

Outside the Old City Hall courthouse after the ruling, the Toronto woman thanked the judge and said her first thought was "goodness gracious" when the ruling came down.

“He put a lot of work and analysis and care into that judgment,” she said. "I respect it and I am grateful.

“I think it’s a significant issue for Canadians. I think people will know now what their government is all about.”

Tobias said she would have been willing to go to jail.

“I would have done whatever was necessary,” she said. “Under no circumstances would I have paid a fine, which was a way of saying I was guilty.”

Tobias's lawyer, Peter Rosenthal, had argued that forcing her to complete the census would violate her freedoms of conscience and free expression.

The judge rejected the charter arguments, but said that Tobias's memory and some conflicting testimony left him with reasonable doubt as to her intent at the time of the refusal.

Tobias Court

Audrey Tobias and her lawyer, Peter Rosenthal, were surprised by the judge's decision. (Trevor Dunn/CBC)

Judge Ramez Khawly noted that for a conviction both the act and intent of a crime must be proved beyond a reasonable doubt, so he had to acquit Tobias.

"It was an unusual judgment in my view," Rosenthal said outside court. "He described our charter arguments as Hail Mary passes and he didn't catch it ...They were novel arguments but he found a more novel argument it seems in analyzing the [intent]."

The judge also described the Justice Department's decision to prosecute Tobias, a Second World War veteran, as a "PR disaster."

Tobias said she planned to celebrate the ruling by gathering with friends and family.

In 2011, StatsCan received 13 million completed census forms, a 98 per cent response rate.

Overall, it referred 54 people for prosecution for failing to complete the mandatory census form.

With files from The Canadian Press