Microsoft, Google and Yahoo have agreed to pay a total of $31.5m to resolve claims that they promoted illegal gambling, the US Department of Justice has announced.

Microsoft will pay $21m, Google will pay $3m and Yahoo will pay $7.5m, the DOJ said. The three companies neither contest nor admit that they promoted illegal online gambling by running advertisements for gambling websites between 1997 and this year.

The settlements stem from an investigation into illegal online gambling by US Attorney Catherine Hanaway of the Eastern District of Missouri, the Federal Bureau of Investigation and the Internal Revenue Service. Hanaway's office indicted the founder of, 10 other people and four companies on charges of racketeering, conspiracy and fraud in a crackdown on online gambling on June 1, 2006.

Hanaway filed a new indictment against Betonsports, three other companies and 12 people on June 28 of this year.

Unregulated online gambling is illegal in the US, the DOJ said. The three companies were accused of procuring participants via the advertisements they ran for illegal activity. Those actions fall under the US aiding and abetting statute, the agency said.

The Microsoft settlement includes a $4.5m fine and a $7.5m contribution to the International Center for Missing and Exploited Children. The company also agreed to create a $9m online advertising campaign, focused on young people, saying that online gambling is illegal under US law. The campaign will run for three years, beginning in early 2008, the DOJ said.

Yahoo has paid $3m to the US government, and it will provide $4.5m worth of online advertising to a public-service campaign designed to inform users that operators and participants in online or telephone-based sports and casino-type gambling in the US may be subject to arrest and prosecution.

"These sums add to the over $40m in forfeitures and back taxes this office has already recovered in recent years from operators of these remote-control illegal gambling enterprises," Hanaway said. "Honest taxpayers and gambling industry personnel who do follow the law suffer from those who promote illegal online behaviour."

Google said that it has cooperated with the investigation. "While we did not admit any wrongdoing, the Department of Justice has advised that online gambling is illegal in the United States and ads to promote it are improper," the company said. "Google voluntarily discontinued running such ads, which were a very small part of our AdWords business, in April 2004."

Yahoo said it stopped running ads for gambling sites "years ago". "After the U.S. Attorney’s Office contacted Yahoo with its concerns, we worked cooperatively over several years to reach this settlement," the company said