Google has agreed to pay a $7m (£4.6m) fine for collecting people's personal data without authorisation as part of its Street View service.
In a settlement with 38 US states, the internet giant agreed to destroy emails, passwords, and web histories.
The data was harvested from home wireless networks as Street View cars photographed neighbourhoods between 2008 and 2010.
Google said it was pleased to have resolved the issue.
"We work hard to get privacy right at Google. But in this case we didn't, which is why we quickly tightened up our systems to address the issue," the firm said in a statement.
"The project leaders never wanted this data, and didn't use it or even look at it. We're pleased to have worked with Connecticut Attorney General George Jepsen and the other state attorneys general to reach this agreement."
New York Attorney General Eric Schneiderman announced the legal settlement.
"Consumers have a right to protect their vital personal and financial information from improper and unwanted use by corporations like Google," he said.
"This settlement addresses privacy issues and protects the rights of people whose information was collected without their permission."
As well as agreeing to delete all the harvested data, Google has also been required to launch an employee training program about privacy and data use which it must continue for at least ten years.
It must also launch a public service advertising campaign to educate consumers about how to secure their information on wireless networks.
Google claims it collected wi-fi data because of rogue code mistakenly included in the software by a lone engineer.
The controversy led data authorities around the world to demand Google made changes.
This is the biggest fine of its type to date, said Jan Dawson, chief telecoms analyst at research firm Ovum.
But he said it was "peanuts" to a giant such as Google.
"What would be a bigger threat to Google is if regulators changed their stance about how it uses data, for instance telling it that it can no longer collect information about browsing habits," he said.
Nick Pickles, head of UK privacy campaign group Big Brother Watch, said the US had handled the issue better than the UK.
"British regulators barely managed to slap Google on the wrist for this, so yet again British consumers seem to be left with weaker protection of their privacy than other countries," he said.