CANBERRA, Australia — Australia’s consumer watchdog sued Google on Tuesday, alleging the technology giant broke consumer law by misleading Android users about how their location data was collected and used.

The Australian Competition and Consumer Commission accused Google of collecting information on users’ whereabouts even after they had switched off the location setting.

“You could have been walking around the city … thinking that your location history wasn’t being collected, when in fact it was being collected and it was being kept,” commission Chairman Rod Sims said.

An Associated Press investigation last year revealed that several Google apps and websites stored user location even if the user had turned off the Location History setting. To stop Google from saving these location markers, users had to turn off another setting, Web and App Activity. That setting, enabled by default, does not specifically reference location information.

Google later clarified in a help page how the Location History works, but it didn’t change the location-tracking practice.

Huge tech companies are under increasing scrutiny over their data practices, following a series of privacy scandals at Facebook and new data privacy rules in Europe. Critics say Google’s insistence on tracking its users’ locations stems from its drive to boost advertising revenue. It can charge advertisers more if they want to narrow ad delivery to people who’ve visited certain locations.

The Australian commission began proceedings in the Federal Court of Australia alleging Google breached the law through a series of on-screen representations made as users set up Google accounts on their Android phones and tablets.

Sims said these on-screen representations meant Google collected, kept and used highly sensitive data about consumers’ location “without them making an informed choice.”

“This is a world-first case,” he said. “This action — in relation to misrepresentations in relation to the data Google collects, keeps and uses — has never been taken before.”

Google said it was reviewing the allegations.

“We continue to engage with the ACCC and intend to defend this matter,” Google said in a statement.

The AP investigation found that even with Location History turned off, Google stores user location when, for instance, the Google Maps app is opened, or when users conduct Google searches that aren’t related to location. Automated searches of the local weather on some Android phones also store the phone’s whereabouts.

Earlier, the business news site Quartz found that Google was tracking Android users by collecting the addresses of nearby cellphone towers even if all location services were off. Google changed the practice and insisted it never recorded the data anyway.

The Australian commission alleges that between January 2017 and late 2018, people setting up their Google accounts on phones and tablets would have incorrectly believed that Location History was the only setting that affected whether the company was collecting a user’s location data.

“When people had their location history turned off, they may have felt that Google was not collecting their location data and recording it and keeping it, but in fact they were,” Sims said.

Sims said the watchdog believed some of the alleged behavior has continued. His commission will ask Google to admit the actions and promise to stop.

The commission also plans to ask the court to impose penalties, he said.