Google will pay $391.5m (£330m) to settle allegations about how it collects user data.
The tech giant tracked the location of users who opted out of location services on their devices, 40 US states said.
Google has been told to be transparent about location tracking in the future and develop a web page that informs people about the data it collects.
It is the largest privacy-related multi-state settlement in US history.
A Google official said: “Based on improvements we’ve made in recent years, we’ve resolved this investigation, which was based on outdated product policies that we changed years ago.”
Last month, Google agreed to pay Arizona $85 million for similar issues related to the way it collects location data.
One case on the subject remains pending in US courts, after Texas, Indiana, Washington and the District of Columbia launched legal action against Google in January.
Knowing a user’s location helps advertisers target their products.
And location services help Google generate $200 billion in annual advertising revenue.
Oregon Attorney General Ellen Rosenblum, who led the case, along with Nebraska Attorney General Doug Peterson, said: “For years, Google has prioritized profit over the privacy of its users.
“He has been cunning and deceitful.
“Consumers thought they had turned off their location tracking features at Google, but the company continued to secretly record their movements and use that information for advertisers.”
Attorneys general said Google had been misleading consumers about location tracking since at least 2014, violating state consumer protection laws.
The company has been told to significantly improve user controls and the way it discloses location tracking, starting in 2023.