(Reuters) - Google has been accused in a lawsuit of illegally tracking the movements of millions of iPhone and Android phone users even when they use a privacy setting to prevent it.

FILE PHOTO: The brand logo of Alphabet Inc's Google is seen outside its office in Beijing, China August 8, 2018. REUTERS/Thomas Peter/File Photo

According to a complaint filed late Friday, Google falsely assures people they won’t be tracked if they turn the “Location History” feature on their phones to “off,” and instead violates their privacy by monitoring and storing their movements.

“Google represented that a user ‘can turn off Location History at any time. With Location History off, the places you go are no longer stored.’ This simply was not true,” the complaint filed in San Francisco federal court said.

The plaintiff, Napoleon Patacsil of San Diego, is seeking class-action status on behalf of U.S. users of Android phones and Apple iPhones who turned the tracking feature off.

He is seeking unspecified damages for Google’s alleged intentional violations of California privacy laws, and intrusion into people’s private affairs.

The alleged tracking by the unit of Mountain View, California-based Alphabet Inc was described in an Aug. 13 Associated Press article, which said it was confirmed by computer science researchers at Princeton University.

Google did not immediately respond on Monday to requests for comment. Michael Sobol, a partner at Lieff Cabraser Heimann & Bernstein representing Patacsil, did not immediately respond to similar requests.

Patacsil claimed that Google illegally tracked him on his Android phone and later on his iPhone, where he had downloaded some Google apps.

He said Google’s “principal goal” was to “surreptitiously monitor” phone users and let third parties do the same.

The help section of Google’s website now says that turning Location History off “does not affect other location services” in phones, and that some location data may be saved through other services, such as Search and Maps.

The case is Patacsil v Google Inc, U.S. District Court, Northern District of California, No. 18-05062.