Google has set aside $500 million not for an antitrust settlement, but to settle a US criminal investigation into claims that it made hundreds of millions of dollars from ads purchased by illegal online pharmacies, according to a report citing people familiar with the matter.

Earlier this week, in an SEC filing, Google said it had set aside $500m for a potential settlement with the US Department of Justice involving the use of Google advertising by "certain advertisers", but the company not provide additional information. Google co-founder Sergey Brin was asked about the filing this week at Google's annual developer conference, but he declined to answer.

It was assumed that the filing with related to possible antitrust investigations into the company's practices, but according to The Wall Street Journal, Google is close to settling with the DoJ over allegations that it knowingly accepted ads from online pharmacies that were violating US law.

Google did not immediately respond to a request for comment.

A $500m payment would be among the largest penalties paid by a company to the US government, according to The Journal. In 2007, Google, Microsoft, and Yahoo! paid a combined $31.5m to settle allegations they profited from illegal gambling sites.

According to The Journal, the potential $500m settlement involves ads for pharmacies in Canada and other countries. In 2004, the paper points out, Google announced that it would continue accepting ads from Canadian pharmacies, sparking criticism from some US pharmacies and regulators. The current investigation was been carried out by the US Attorney's Office in Rhode Island and the Food and Drug Administration (FDA) as well as other agencies, The Journal said.

In February 2010, Google announced that it would only allow ads from US pharmacies approved by the National Association of Boards of Pharmacy and from Canadian online pharmacies approved the Canadian International Pharmacy Association.

The Journal report is just another indication that Google's ad system can be friendly to bad actors, and it raises more questions about how far Google goes to prevent such exploitation. Harvard professor Ben Edelman estimates, for example, that the company makes nearly $500m a year from "typosquatters". In a 2010 study, he estimated that at least 938,000 domains were typosquatting on the top 3,264 ".com" websites, waiting for web users to mistype or misspell a URL, and that 57 per cent of these "mispelled" domains included Google pay-per-click ads. Typosquatting can violate US trademark law. Google says it will remove typosquatting domains if it is made aware of them.

Ads from illegal online pharmacies are more serious issue. As The Journal points out, Google has taken action before against such sites. In 2003, for instance, the company said it had banned ads from US operations that offer Vicodin, Viagra, and other drugs without a prescription. ®