Microsoft Corp., Yahoo Inc. and Google Inc. also agreed to stop accepting ads for sports wagering and other online gambling, U.S. Attorney Catherine Hanaway said.
The investigation conducted by Hanaway's office, along with the IRS and the FBI, dates to 2000, she said. Negotiations have been going on for 12 to 18 months, she said.
"This is a very profitable business that had a lot of money to spend on marketing," Hanaway said of the online gambling firms advertising on the Web.
All three companies said they stopped taking the ads years ago.
"I do think it will have a major impact, Hanaway said. Obviously these are three of the largest online organizations in the world."
Microsoft's $21 million portion of the settlement includes a $4.5 million forfeit, $7.5 million to be paid to the International Center for Missing and Exploited Children and $9 million in public service ads over a three-year period starting next year.
The public service campaign will be aimed at informing users, especially those of college age and younger, that online gambling is illegal.
Microsoft said it stopped accepting ads from sites associated with online gambling nearly four years ago.
"This agreement reflects our ongoing commitment to online safety," the company said in a statement. "We're hopeful that our educational campaign will stop young people from gambling before they start."
Yahoo's $7.5 million share of the settlement includes a $3 million forfeiture and $4.5 million in public service ads over three years.
"Yahoo stopped accepting online gambling advertisements years ago, and after the U.S. Attorney's office contacted Yahoo with its concerns, we worked cooperatively over several years to reach this settlement," spokeswoman Kelley Benander said in a statement.
Google is to pay $3 million, less than half its average daily profit of $11 million. Spokesman Jon Murchinson said the ads appeared in sponsored links at Google.com and other Web sites that that belong to its ad network.
"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," Murchinson said in a statement. "Google voluntarily discontinued running such ads, which were a very small part of our AdWords business, in April 2004."
The U.S. Attorney's office here has led in the effort to halt illegal Web-based gambling, a roughly $6 billion a year industry in the U.S. that violates the Federal Wire Wager Act among other federal laws.
Earlier this year, the London-based Internet gambling firm BetOnSports PLC pleaded guilty in St. Louis to federal racketeering charges. Cases are still pending against company executives. Hanaway's office also settled a civil case against BetOnSports in November 2006. That settlement prohibits the company from accepting any bets from gamblers in the U.S.
The investigations of Microsoft, Yahoo and Google were unrelated to the BetOnSports case, authorities said.
The U.S. Attorney's office in St. Louis has previously prosecuted and settled with other companies over Web-based gambling and gambling ads agreements that generated more than $40 million in forfeitures and back taxes.
"I do think the prosecution from this office has had a chilling affect on online gambling," Hanaway said.