California’s leading industry regulator said in an order Tuesday that ride-hail drivers are employees under AB5, the state’s new gig-work law, marking a significant development in the battle over drivers’ status.

The decision, by the California Public Utilities Commission (CPUC), which regulates ride-hailing companies across the state, comes six months after a state law took effect that makes it tougher for companies to classify workers as contractors rather than employees.

Uber in December sued to block the new law,  arguing that it punished app-based companies and was unconstitutional.

Lyft in a statement called the CPUC’s decision “flawed” and said forcing drivers to be employees will have horrible economic consequences for California.

Separately, in a recent letter to the ride-hailing companies, the agency said they must get workers’ compensation coverage for their drivers by July 1, the date set in AB5, or face consequences such as fines or even having the agency cancel, revoke or suspend their operations.

Opponents of the law stated that requiring Uber and Lyft drivers to be employees could drive the companies out of the state entirely because of the high costs involved, including paying for time when drivers are logged into the app and awaiting ride requests.

Others, especially labor unions, said it was a welcome development, and would ensure so-called gig workers driving for ride-hailing companies would get fair compensation for their services.