A federal judge threw out a $388 million (£242 million)patent infringement jury verdict against Microsoft, ending a six-year legal skirmish.

In April, a jury found that the world's largest software maker had infringed on a patent owned by Uniloc.

Irvine, California-based Uniloc makes software that prevents people from illegally installing software on multiple computers.

Uniloc had argued Microsoft's "product activation" system used in Windows XP, Office XP and Office 2003 programs infringed on several parts of a related patent, and that the software maker had copied Uniloc's technology rather than developed similar work on its own.

Uniloc's original lawsuit was filed in US District Court in Rhode Island in 2003. Microsoft won summary judgement in 2007, and Uniloc appealed.

The US Court of Appeals for the Federal Circuit sent a much narrower version of the case back to district court, which ruled in Uniloc's favour earlier this year. Microsoft asked the judge to reconsider.

US District Judge William Smith in Rhode Island dismissed the jury verdict in a decision made public late Tuesday.

"The Court has reviewed the transcripts and evidence with painstaking detail in the light most favourable to Uniloc, careful not to act as the eleventh juror. What remains is a firm belief (indeed a certitude) that the jury 'lacked a grasp of the issues before it' and reached a finding without a legally sufficient basis," Smith wrote, finding once again that Microsoft did not infringe on the patent.

Smith also said the jury's method of deciding how much Microsoft owed Uniloc, based on total sales of Windows XP and Office, was flawed.

Microsoft, based in Redmond, Washington, said in a statement that is pleased with the outcome. Lawyers for Uniloc did not immediately return a call seeking comment.