SAN FRANCISCO (AP) — The California Supreme Court says the public has the right to access emails and text messages about government business sent on California officials’ private accounts.

The ruling by a unanimous court on Thursday clears up a murky area of law in the Golden State.

READ MORE: Napa Valley Looks to Restaurant Week to Help Jump-Start Economic Comeback

The use of private email accounts by public officials has faced scrutiny in recent years, with some using it as a way to avoid disclosure. Many states treat those emails as public records.

READ MORE: Wind-Whipped Wildfire in Big Sur Shuts Hwy 1, Forces Evacuations

But opponents have raised privacy concerns. They say public officials sometimes need confidentiality to discuss unpopular views.

The lawsuit before the California Supreme Court involved messages on private devices used by San Jose’s mayor and members of the city council.

MORE NEWS: Curry Hits Winning Jumper, Warriors Beat Rockets 105-103

© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.