An appeals court sided with Uniloc in its patent-infringement lawsuit against Microsoft Corp but ordered a new trial on damages.

The U.S. Court of Appeals for the Federal Circuit ruled that Microsoft infringed a Uniloc patent to prevent software piracy but also tossed out a popular method of calculating damage awards for infringement.

Microsoft's shares fell slightly when the ruling was announced but soon recovered. The company's stock closed up 0.38 percent at $28.0875.

Uniloc USA and its Singapore-based parent filed suit against Microsoft in 2003, accusing it of infringing a Uniloc patent to prevent unlicensed use of its Windows XP operating system and parts of its Office suite of software products.

After years of legal wrangling, a jury in the U.S. District Court for the District of Rhode Island found in favor of Uniloc in April 2009, awarding $388 million in damages.

Microsoft appealed the verdict to the trial court judge, who overturned the jury decision in September 2009.

The appeals court decision tossed out the judge's ruling that Microsoft did not infringe the patent but upheld the judge's ruling that infringement was not willful. Under patent law, damages can be trebled if infringement is willful.

In its ruling, the court also said it would no longer accept the 25 percent rule, which assumes that the company licensing a patent is due 25 percent of the value of the product.

This court now holds as a matter of Federal Circuit law that the 25 percent rule of thumb is a fundamentally flawed tool for determining a baseline royalty rate in a hypothetical negotiation, the court said in its ruling.

Microsoft, which has set aside money to cover any damages, was pleased with the decision to ditch the 25 percent rule.

The case may signal the end of unreasonable and outsized damages awards based on faulty methodology, said David Howard, a vice president of Microsoft, in a statement.

Uniloc Chief Executive Brad Davis said the ruling was positive for his privately held company.

We disagree with the damages component but at the end of the day ... it's a big win on the strength of the patent, Davis told Reuters. We invented it. We thought of it.

The case: Uniloc USA, Inc., et al v. Microsoft Corp., U.S. Court of Appeals for the Federal Circuit, 2010-1035, -1055.

(Reporting by Diane Bartz; editing by John Wallace, Bernard Orr)