Sometimes, Goliath wins.

Capping a seven-year, globally watched legal battle between biotechnology giant Monsanto Co. and a scrappy 73-year-old Saskatchewan farmer, the Supreme Court of Canada ruled yesterday that Percy Schmeiser violated Monsanto's patent by growing the company's high-tech canola and saving the valuable seeds produced by those plants.

The landmark 5 to 4 decision marks the first time a high court in any country has ruled on how extensively a company can control a farmer's use of its gene-altered seeds and plants. By affirming broad proprietary rights for Monsanto in Canada -- a country that allows only limited patents on life forms and is considered relatively friendly to farmers' rights -- the court set both national and global precedents that strengthen the hand of agricultural biotechnology corporations.

Carl Casale, Monsanto's executive vice president, hailed the ruling as a seminal declaration that will give agricultural companies a clear legal framework in Canada.

"It's a great day," Casale said from Monsanto headquarters in St. Louis. "Other companies beyond Monsanto were just told today that Canada continues to be a very good place to invest for the benefit of farmers."

But opponents of genetically engineered food and other activists, for whom Schmeiser has grown to be a folk hero, vowed to continue their battle against what they claim is an emerging corporate monopoly over the world's seed and food supply. Among other approaches, they said they would lobby Canada's Parliament to change the country's patent law.

"The biotech industry should recognize that today's victory will be short-lived," said Nadege Adam of the Council of Canadians, an advocacy group that had supported Schmeiser. "They need to know that the backlash will come. It will continue and get stronger."

The ruling was the most definitive judgment to date in a series of legal controversies over agricultural technology playing out in the world's courts and legislatures.

Monsanto had sued Schmeiser after learning that much of the farmer's land was sown with the company's patented Roundup Ready canola, although he had never purchased the seed from the company or signed a required grower agreement. The variety has a gene that makes the plants resistant to Monsanto's Roundup weed killer, allowing farmers to spray the herbicide freely without worrying about harming their crop.

Farmers who purchase the seeds are not allowed to collect and replant seeds from the plants they grow -- even though seed saving is a long-standing tradition among canola farmers. Monsanto has argued that seed saving would prevent the company from recovering its research and development costs, since first-time buyers would never have to purchase the expensive seeds again.

Schmeiser claimed the gene-altered plants arrived on his land around 1997 uninvited, perhaps as a result of pollen blowing from a neighbor's field. Two lower courts, noting that more than half of Schmeiser's 1,030 acres bore the high-tech plants by 1998, concluded that he had infringed Monsanto's patent by saving and replanting the seeds and ordered him to pay more than $100,000 in costs and penalties.

The case took on special significance in Canada, whose Supreme Court had previously ruled that patents cannot be issued on "higher organisms," including animals and plants. The question arose: Since Monsanto's Canadian patent was only on canola genes and cells, could Schmeiser's unintentional possession of entire plants -- which cannot be patented -- constitute infringement?

Although four members of the court flatly said no, five said yes. But the court reversed the lower courts' monetary penalties against Schmeiser, saying there was no evidence he had profited from the added gene because he did not use Roundup weed killer. The court told each side to pay its own legal costs.

After he and his wife got the news yesterday morning, "we both had tears in our eyes," Schmeiser said. "But at least we still have a roof over our heads. This could have broken us financially."

Monsanto has sparked the wrath of farmers in the United States and Canada by using private detectives to investigate their fields, and a few jurisdictions have passed laws giving farmers certain rights and protections in those cases.

Some states have considered legislation that would make biotech companies liable for windblown pollen that invades fields of conventional crops, which in some cases are worth more than the engineered varieties. In Canada, organic farmers have filed a class action against Monsanto and another company for allegedly polluting their fields with gene-altered pollen.

Some legal experts said that case might be strengthened by yesterday's ruling.

"If you're going to claim ownership of this gene wherever it lands, then you ought to assume responsibility, too," said Terry Zakreski, Schmeiser's attorney in Saskatoon.

Monsanto has sued scores of farmers in both the United States and Canada. The company has said it does so only as a last resort, after settlement talks fail, and only in cases in which it believes the violations of company patents were knowing and deliberate. When the company sues, "it is not an accident," said Monsanto's Casale. "We have never lost a case."

The issue is not squeezing out "every last nickel" for Monsanto, he said, but keeping the playing field level. If a few farmers are able to use the technology free while others have to pay, the dishonest ones will gain a competitive advantage on their neighbors, he said.

"I can't tell you the number of farmers I've talked to who have said, 'I understand the value this technology brings,' " Casale said. " 'I have no problem paying for this technology. I just want to know that everybody else is paying, too.' "

But activists said they feared the precedent bode poorly for the world's subsistence farmers, who are dependent on saving seed from each year's crop to plant the next year.

"The decision has grave implications for farmers and society everywhere the gene giants do business," said Pat Mooney, executive director of ETC Group, an advocacy group that focuses on the risks of technology and had intervened in the case in Schmeiser's defense. "The decision not only undermines the rights of farmers worldwide, but also global food security and biological diversity."

Percy Schmeiser, a farmer in Saskatchewan, infringed a patent by saving and using canola seeds, Canada's Supreme Court ruled.