MILTON, Ont. -- A Toronto woman who gave water to pigs on a truck headed to an abattoir didn't break the law since she didn't harm the animals or prevent them from being slaughtered, an Ontario judge ruled Thursday as he found the activist not guilty of a mischief charge.

Anita Krajnc also did not intend to hurt the pigs or mean to cause the slaughterhouse to reject them, Justice David Harris told a Milton, Ont., courtroom packed with animal activists.

Court heard that on June 22, 2015, Krajnc was dumping liquid from a water bottle into a truck carrying pigs in Burlington, Ont., as the vehicle approached a slaughterhouse.

Despite the Crown's argument that Krajnc gave the pigs an "unknown substance," potentially contaminating the food supply, there was no evidence she gave them anything but water or that the slaughterhouse was concerned about such a risk, Harris said.

But the judge rejected a defence argument that Krajnc should be cleared because she was acting in the greater good, and suggested she may have been motivated in part by the prospect of drawing attention to her cause.

"This may be the most ironic aspect of this case," Harris said. "The fact that Ms. Krajnc gave water to a pig received little attention initially."

"Conversely, the act of prosecuting Ms. Krajnc has probably led to enough bad publicity for the pork industry that it might be said that the prosecution actually accomplished what they accused Ms. Krajnc of trying to do."

Cheers erupted in the courtroom as Krajnc, an activist with the group Toronto Pig Save, was acquitted on the charge of mischief laid in connection with the incident. She had pleaded not guilty, although she admitted to giving the pigs water.

Outside court, Krajnc acknowledged that the case has bolstered her cause and said she hoped it would encourage others to stand up for animal rights.

"This is how social movements get their word out, we go outside our comfort zone and we do what's right," she said.

James Silver, one of Krajnc's lawyers, said the court ruling "acknowledges that compassion is not a crime," which he deemed an important victory.

Her other lawyer, Gary Grill, nonetheless expressed some disappointment that the judge "missed the greater arguments...about Anita acting in the public good."

"Should the matter arise again, we'll be ready to make that argument all over," he said.

A spokesman for a group representing farmers said he recognized Krajnc was trying to do the right thing but said the ruling was a letdown.

Pat Jilesen, director of the Ontario Federation of Agriculture, said that for farmers, it was a matter of protecting food safety.

Krajnc's behaviour, no matter how well-intentioned, "puts not only the animals at risk, it puts people at risk," he said.

The Crown had argued that the pigs were the property of a farmer, and Krajnc was interfering with his property.

In his decision, Harris said the activist had not interfered with anyone's property.

But he took issue with the defence equating Krajnc giving water to pigs with people giving water to Jews transported on cattle trains during the Holocaust, calling the comparison "offensive."

He also rejected comparisons to historic rights activists such as Gandhi, Nelson Mandela and Susan B. Anthony.

Harris said that while it is legal for activists such as Krajnc to tout a meat-free lifestyle and put pressure on governments to change the law, "they must however do this within the confines of the law that currently exists."

Krajnc had testified that she was treating the pigs as she would want to be treated.

The pigs' owner, farmer Eric Van Boekel, testified that he complained to police because he was worried there were contaminants in the water, and that could lead the slaughterhouse to turn his hogs away.