Google’s $500 million settlement with the U.S. government over allegations the company aided illegal online drug sales involved evidence the government obtained during a sting operation, The Wall Street Journal reports.

A convicted con artist, David Whitaker, posed as an agent for online drug dealers in email exchanges and phone calls with Google sales executives, according to the newspaper. He spent $200,000 in government funds for ads selling narcotics, steroids and other controlled substances, all while wearing leg irons and guarded by federal agents.

Last summer, Google agreed to pay $500 million to avoid being prosecuted for aiding illegal online pharmaceutical sales. In the settlement, the company acknowledged it had improperly and knowingly assisted online pharmacy advertisers, allegedly based in Canada, to run ads for illegal pharmacy sales that targeted American customers.

Whitaker started an online pharmacy in Mexico in 2006, selling human growth hormone and steroids to American customers through Google ads. These drugs, sold by prescription only in the United States, are popular with body builders who want to bulk up muscles and people who want to slow the signs of aging. The drugs are not approved in the U.S. for these uses, and Google’s policy prohibited advertising them online.

“It was very obvious to Google that my website was not a licensed pharmacy,” Whitaker told the newspaper. “Understanding this, Google provided me with a very generous credit line and allowed me to set my target advertising directly to American consumers.” He was arrested in 2008 for entering that country illegally, and returned to the U.S. to face charges in another case. He told the authorities about how Google allegedly helped his online pharmacy.

Federal prosecutors set up a task force to investigate the allegations, and had Whitaker pose as an agent for advertisers looking to spend a large amount of money with Google. Federal agents set up fake websites for human growth hormone and steroids.

They added websites for weight-loss medications, the abortion pill RU-486, and prescription-only narcotics such as oxycodone and hydrocodone. To end the sting, the agents told Google that Whitaker’s fictional character had died.