Struggling internet giant Yahoo has won a massive payout from a fake lottery that used its name to scam people.

A US court has ordered the con men who ran the fake lottery to pay Yahoo $610m (£388m), although it is thought unlikely that the money will ever be recovered.

The scam involved people being emailed on the pretense that they had won a prize in a Yahoo-administered lottery.

Victims were persuaded to hand over money to retrieve cash prizes, which never actually existed. Others found that their bank accounts had been raided by the con artists.

In a ruling today, the judge found against the lottery organisers, and told them to pay Yahoo $27m for trademark infringement and $583m for breaking US laws on the sending of junk mail.

"Yahoo takes the protection of its users and its brand very seriously," said Christian Dowell, legal director of global brand protection at Yahoo.

"Our ultimate goal is to ensure that users continue to trust Yahoo as the leading US email provider."

Yahoo first took legal action in 2008 against individuals and companies in Thailand and Nigeria suspected of running the fake lottery after identifying them by tracing internet records.

Legal files submitted by the company reveal that between December 2006 and May 2009, more than 11.6 million hoax lottery emails were sent through its own email system.

US Judge Laura Taylor Swain awarded Yahoo $50 for each scam email, amounting to $583 million, or around half of Yahoo's $1.2 billion profit for the whole of 2010.

However, judge Swain expressed doubt that any money would ever be collected from the spammers.

"Defendants have never responded in this action or appeared before the court, much less co-operated with the court," she wrote.

None of the defendants - a group of Thai and Nigerian individuals, a Nigerian corporation and a Taiwanese corporation - have so far responded to Yahoo's complaint.