Audrey Tobias, 89, told Ontario court she agreed with the aims of the census, but objected to the involvement of American arms behemoth, Lockheed Martin.
"When I learned that the contract for the information technology was being given to a foreign company, I was shocked," Tobias testified.
"I am ashamed of my prime minister in Canada who ultimately made the decision. Because of that, I couldn't fill it in."
Tobias, of Toronto, is charged with violating the Statistics Act.
The defence maintained that forcing her to complete the census would violate her freedoms of conscience and free expression.
Judge Ramez Khawly was clearly skeptical as lawyer Peter Rosenthal made his arguments, and wondered aloud what would happen if the court sent a "signal" that it was OK to opt out of the census.
The Crown said Tobias had no lawful excuse for her refusal.
Tobias said she was unconcerned about the consequences of a conviction, which carries a maximum three months in prison.
"I'm not worried; we'll take it as it comes," she said during a break in the proceedings.
"Of course, I would not pay (a) fine — that would be an admission of guilt."
She said she would not do any community service for the same reason.
The Crown called one witness, Yves Beland, operations director at Statistics Canada, who outlined the importance of the census to, among other things, intergovernmental equalization and transfer payments.
"It is the only detailed and coherent source of information," Beland said.
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.
In the witness stand — her flaming ginger hair barely visible over the court reporter — Tobias explained she was a member of the Women's Royal Canadian Naval Service during the Second World War.
She became a committed peace activist after viewing movie footage of the war and the atomic bombing of Japan, and touring a desolate post-war Europe.
"I recall the great pain of that," she said, as a court full of supporters watched.
Lockheed developed and supplied data-crunching software to Statistics Canada for the 2006 census. It helped rework the program for the 2011 count.
"They provided a technical solution to integrate information coming from telephone, paper and Internet," Beland said.
Lockheed's role was "descoped" before 2006 amid concerns in Canada the company might have to pass on information to the U.S. government under the Patriot Act.
Highlighting her privacy concerns, Tobias said the U.S, denied her entry for 20 years for her peace activism.
"Oh, well, yes, anybody who's anybody might be prohibited from entering the United States," she said.
Beland, who said he has never heard of Edward Snowden — he recently went public with a massive U.S. surveillance system — was adamant Lockheed had no access to any data on Canadians.
StatsCan systems, he said, were completely secure, a pronouncement the defence refuted.
It is "absolutely not possible" to ensure 100 per cent security of large systems, Arcady Genkin, a University of Toronto system administrator, testified.
Either way, Tobias was unbowed.
The census contract, she said, should have stayed in Canada and not involved the military.
"I would like to see us on the path of being a leader in peaceful solutions to international problems."
At one point, her supporters applauded in the courtroom.
"I run a loose court, but it's not a movie theatre," Khawly said.
The judge reserved his decision until Oct. 9.
Also on HuffPost