Massachusetts will become the second state ever to pursue legal action against ride-hailing giants Uber and Lyft over their classification of workers, a system that Attorney General Maura Healey argues leaves almost 200,000 drivers without access to key employment benefits.

Healey filed a lawsuit in Suffolk Superior Court against the two companies on Tuesday alleging that, by categorizing their drivers as independent contractors rather than employees, Uber and Lyft are violating the state's wage and hour laws.

The nearly 200,000 drivers in Massachusetts, the majority of which the companies say work part-time hours, do not have access to a guaranteed minimum wage, guaranteed paid sick leave, workers' compensation or traditional unemployment insurance that they would gain if they were deemed to be employees, Healey said.

By improperly categorizing their fleets, she argued, Uber and Lyft are able to pocket "hundreds of millions" of dollars every year that they should be paying in benefits and into state systems.

"The bottom line is that Uber and Lyft have gotten a free ride for far too long," Healey said during a Tuesday virtual press conference. "For years, these companies have systematically denied their drivers basic workplace protections and benefits and profited greatly from it."

Her lawsuit accelerates a growing national fight over both the ride-hailing services themselves and an economy that is growing more reliant on "gig workers," who often have more flexibility but lack many of the protections that come with full employment.

Both companies responded to Healey's lawsuit Tuesday by arguing that it would contribute to widespread COVID-era economic strain by effectively forcing them to trim down their workforces.

"This lawsuit threatens to eliminate work for more than 50,000 people in Massachusetts at the worst possible time," Lyft spokesperson CJ Macklin said in a statement. "Drivers don’t want this -- 89% of Massachusetts Lyft drivers drive fewer than 20 hours per week and choose to drive rideshare precisely because of the independence it gives them to make money in their spare time. Across the country, drivers have said they want to remain independent contractors over employment by a 4 to 1 margin."

The two companies also argued that most Massachusetts drivers work part-time and that, according to surveys, most would prefer to remain independent contractors because of the scheduling flexibility it offers compared to traditional employment.

"At a time when Massachusetts' economy is in crisis with a record 16% unemployment rate, we need to make it easier, not harder, for people to quickly start earning an income," Uber spokesman Alix Anfang said in a statement. "We will contest this action in court, as it flies in the face of what the vast majority of drivers want: to work independently. We stand ready to work with the state to modernize our laws, so that independent workers receive new protections while maintaining the flexibility they prefer."

In May, California Attorney General Xavier Becerra also sued the companies on similar grounds. That case was largely prompted by passage of a new state employment law often referred to as AB5.

A similar law has existed in its current form in Massachusetts since 2004. Under that statute, workers are assumed to be employees unless companies pass a three-pronged test to prove they are independent contractors: workers must be free from the employer's direction and control, perform services outside the usual course of business, and engage in an independent trade or occupation for the service they offer.

Healey alleged that Uber and Lyft fail the first part of that test and that drivers are not, in fact, free from control because they can be suspended or terminated without recourse, they are frequently monitored through the apps, and they are only paid through an obtuse algorithm that changes frequently.

"This particular model is benefiting the company, but it's not benefiting workers and it's actually forcing taxpayers -- and frankly other businesses, responsible employers -- to foot the bill," Healey said.

While she could not provide an exact estimate for the total additional profit Uber and Lyft make through the alleged misclassifications, Healey said a $650 million penalty New Jersey imposed on the companies last year over driver classification is a useful parallel.

Healey was joined at her virtual press conference by Massachusetts AFL-CIO President Steven Tolman, Greater Boston Labor Council Executive Secretary-Treasurer Darlene Lombos, Brandeis University professor and former U.S. Wage and Hour Administrator David Weil, and Felipe Martinez, a rideshare driver and member of the Boston Independent Drivers Guild.

"These models allow businesses really to have their cake and eat it too," Weil said. "They get all the benefits of the control of a workforce and management of a workforce, but they sidestep their responsibility to those workers under our state law here in Massachusetts as well as federal law."

Martinez, an Andover resident who serves as chair of the Guild's Board of Directors, has been driving for Uber and Lyft since 2017.

"When I first started driving, I believed the lie," Martinez said. "I thought I was an independent contractor with my own business. But, Uber and Lyft controlled how much I got paid, where I drove, and changed the terms and conditions whenever they wanted."

"I realized I was an employee in disguise," he continued.

Although the law Healey cites has been on the books since 2004, neither she nor any of her predecessors had taken action against Uber and Lyft over worker classification until now.

Healey said that while her office has been receiving complaints for years, the COVID-19 pandemic generated additional momentum for action because it demonstrated "just how many folks are employed in this gig economy who, it turns out, lack very basic protections and benefits."

The companies started offering paid sick leave during the pandemic, but Healey said the new policies "still fall short of what's required under Massachusetts earned sick time law."

Her case will almost certainly prompt a fight from the influential and well-resourced companies.

Earlier this year, Uber, Lyft and DoorDash reportedly poured more than $100 million into a California ballot measure aimed at exempting them from the new gig employment law.

Healey's lawsuit seeks a declaratory judgment ordering the companies to comply with the state wage and hour laws. The action does not immediately seek any payments or relief from Uber and Lyft, but Healey said that step could follow if the judgment is awarded.