Massachusetts’ highest court on Tuesday threw out a ballot measure that would have put gig-worker classification before the state’s voters in November, handing gig companies another setback in their efforts to change labor laws to suit their business model.

The measure, which was backed by Uber Technologies Inc. UBER, -1.62%, Lyft Inc. LYFT, -0.07%, DoorDash Inc. DASH, +1.94% and Instacart, promised some new benefits to app-based drivers and delivery workers but would allow them to continue to classify those workers as independent contractors and not employees. The companies were successful in passing a similar version of the ballot measure in California in 2020, but are currently appealing a court decision deeming that law unconstitutional.

The Supreme Judicial Court found that the proposed measure, of which there are two versions, failed to comply with the requirement that measures address related or mutually dependent subjects.

“We conclude that the petitions contain at least two substantively distinct policy decisions, one of which is buried in obscure language at the end of the petitions,” Justice Scott Kafker wrote in the decision in the challenge brought by labor groups, adding that the state attorney general’s certification of the measure was therefore “in error.”

Opponents of the proposed measure, which include drivers groups, civil-rights organizations, consumers advocates and others, had lined up to fight the proposal starting last year, saying they wanted to avoid a repeat of what happened in California, where the companies spent more than $200 million to pass their ballot measure. They estimate that there are more than 100,000 app-based gig workers in Massachusetts.

“Millions of Massachusetts drivers, passengers, and taxpayers can rest easier knowing that this unconstitutional bid by Big Tech CEOs to manipulate Massachusetts law has been struck down by the Supreme Judicial Court,” said Wes McEnany, campaign director for the “Massachusetts is not for sale” coalition, in a statement on Tuesday. “We commend the court for getting it right on this issue and we will remain vigilant and united against any further attempts by Big Tech to water down worker and consumer protections in Massachusetts or beyond.”

Uber, Lyft and DoorDash deferred comment to the gig companies’ coalition, which released a statement saying opponents of the measure denied Massachusetts voters a right to weigh in on the issue. Instacart has not returned a request for comment.

“The future of these services and the drivers who earn on them is now in jeopardy, and we hope the legislature will stand with the 80% of drivers who want flexibility and to remain independent contractors while having access to new benefits,” a spokesman for the companies’ coalition said in a statement. The coalition often cited industry-backed surveys saying most app-based workers prefer to be independent contractors.

See: From treatment of gig workers to tip transparency, the app-based economy could see key changes in 2022

The gig companies are waging different types of battles in different places over worker classification, pay and benefits. In April, Uber and Lyft got their first legislative victory at the state level, in Washington state, where they secured a different worker category for their drivers that falls short of employee classification. In May, Seattle passed a minimum-wage ordinance for delivery drivers and other gig workers. Uber, DoorDash and Instacart opposed the ordinance.