LOS ANGELES — People relied on the most popular mobile weather app to make plans and figure out how to dress for the elements, but its owners used it to track their every step and profit off that information, Los Angeles prosecutors said Friday.

The operator of The Weather Channel mobile app misled users who agreed to share their location information in exchange for personalized forecasts and alerts, and they instead unwittingly surrendered personal privacy when the company sold their data to third parties, City Attorney Michael Feuer said.

Feuer sued the app's operator in Los Angeles County Superior Court to stop the practice. He said 80 percent of users agreed to it because the company had intentionally obscured disclosures on how it uses geolocation data within a 10,000-word privacy policy.

"Think how Orwellian it feels to live in a world where a private company is tracking potentially every place you go, every minute of every day," Feuer said. "If you want to sacrifice to that company that information, you sure ought to be doing it with clear advanced notice of what's at stake."

A spokesman for IBM Corp., which owns the app, said it has always been clear about the use of location data collected from users and will vigorously defend its "fully appropriate" disclosures.

Marketed as the "world's most downloaded weather app," The Weather Channel app claims it has approximately 45 million users a month, the lawsuit said.

Feuer said operators of the app, TWC Product and Technology LLC, sold data to at least a dozen websites for targeted ads and to hedge funds that used the information to analyze consumer behavior. Feuer said he learned about the sale of the private data from an article in The New York Times.

The lawsuit seeks to stop the company from the practice it calls "unfair and fraudulent" and seeks penalties of up to $2,500 for each violation.

It comes as companies, most notably Facebook and Google, are increasingly under fire for how they use people's personal data. Both companies faced congressional hearings last year on privacy issues, which are likely to remain on lawmakers and regulators' minds both nationally and in California.

In June, California lawmakers approved what experts are calling the country's most far-reaching law to give people more control over their personal data online. That law doesn't take effect until next year.

Feuer said he hopes the case inspires other lawsuits and legislation to curb data-sharing practices.

IBM bought the app along with the digital assets of The Weather Company in 2015 for $2 billion but did not acquire The Weather Channel seen on TV, which is owned by another company.