A thorough investigation in 2018 by the Associated Press found that many Google services on Android devices and iPhones store user location data even if privacy settings have been used that expressly say they will prevent Google from doing so.

According to the research, Google’s engineers were concerned about how the company was secretly tracking its users.

According to AP News recently, Arizona Attorney General Mark Brnovich decided to open an investigation that culminated in his lawsuit against Google three months ago. The complaint accuses Google of engaging in dishonest business practices that misled Arizona consumers and could result in billions of dollars in fines if Brnovich prevails in his lawsuit.

“The recently unsealed documents reveal statements from Google’s own engineers that are in conflict with what the company has been representing to the public,” Brnovich said in a Wednesday statement.

The documents Brnovich refers to reveal that Google knew it had a massive problem when an AP News article published in August 2018 explained how the company continued to track users’ whereabouts even after they had turned off what Google called “location history. The published documents include internal Google emails.

According to Fox10, in the disturbing leaked emails from Google engineers, one can read angry comments to the company for misleading people about how their location tracking settings worked. “I agree with the article,” wrote one engineer in a particularly forceful assessment after the AP story was published. “Location off must mean location off.”

Another Google engineer wrote, “We’re actually not very good at explaining this to users. Another agreed that what the company was doing was “definitely confusing from the user’s point of view.”

The emails’ publication is embarrassing for a company that tries to generate confidence and security with millions of users of services such as maps and online searches. Users may unwittingly be giving out their personal information for Google to use, for example, to target advertisements. Those ads, AP News reported, generated more than $130 billion in revenue last year alone.

Google recognized errors in its privacy controls and said its specialists are continually working to discuss and improve them. Even after the AP article on location tracking came out two years ago, Google made changes to its privacy settings to make it easier for users to hide their movements.

The revisions and the announcements from Google seeking to reassure users did not reassure Attorney General Mark Brnovich, who finally decided to develop and move forward with his investigation.