The battle between the rights of gig workers and the cost of flexibility has arrived in Minnesota.

Minnesota Attorney General Keith Ellison on Thursday filed a lawsuit alleging that Shipt, the grocery delivery business of Target Corp., cheats workers of benefits and rights by classifying them as independent contractors.

The suit marks the first time in the decade or so since the so-called gig economy became a feature of American work culture that a Minnesota policymaker has challenged one of its fundamental traits.

"I think that it is a fair question to ask: In this gig economy, are workers being treated fairly?" Ellison said at a news conference.

Workers who are not classified as company employees don't qualify for many benefits that are seen as normal in a workplace, including overtime pay and paid sick leave, Ellison said. His suit came just hours after a similar action against Shipt by Washington D.C. Attorney General Karl Racine.

In a statement, Shipt said it would fight both lawsuits. The company employs about 300,000 people who choose when to take shopping and delivery assignments from Shipt.

"Shoppers with Shipt are independent contractors, and the flexibility that comes with being an independent contractor is the primary reason Shipt shoppers choose to earn on our platform," said Evangeline George, a spokeswoman for Shipt, in a statement.

After the advent of the smartphone, investors poured money into companies like Shipt that developed apps to offer basic services — such as taxi rides, deliveries, home improvements and overnight lodging — at lower prices than existing providers. Some entered regulated markets, like the taxi industry in the Twin Cities, before policymakers could act.

The app-based companies saved money chiefly by relying on workers to absorb most operating costs, such as by using their own cars for deliveries or their own spare bedrooms for house guests. They signed workers as independent contractors subject to payment terms they set.

Workers have battled back in some states, most notably California where some of the largest gig economy firms are based. The state in 2018 passed a law requiring a minimum wage for gig workers. But in 2020, voters passed a ballot initiative excluding gig workers from many employee rights. A court later ruled the proposition violated the state constitution.

And more disputes are in courts there. Instacart, the nation's No. 2 grocery delivery firm after Walmart, agreed two weeks ago to pay $46.5 million to settle a lawsuit filed by the San Diego City Attorney's Office for improperly classifying its workers.

This summer, a bipartisan group in the U.S. House proposed a bill that would let businesses like Shipt to continue classifying gig workers as independent contractors but add some legal protections for the workers. Earlier this month, the Labor Department proposed new guidance on worker classification that would reverse Trump-era standards that gave leeway to employers.

Gig economy companies argue that the ability of gig workers to set their own schedule means that they shouldn't be afforded other benefits.

As at most gig companies, Shipt workers receive customer orders on their smartphones. They shop Target or other stores and then deliver the orders in their own cars, typically within a short time window.

They are paid based on an algorithm that takes into account the cost of the order, the estimated drive time, and other factors. They can also get tips from customers.

Shipt said a recent survey it conducted found 80% of Shipt shoppers believe that access to flexible work was their top priority. The attorney general's office said that, in Minnesota, flexibility isn't the only thing that determines whether somebody is an independent contractor.

"Gig economy companies like to tie the flexible schedule they offer workers to being independent contractors, but that simply isn't how the law works," Assistant Minnesota Attorney General Jonathan Moler said.

The state of Minnesota has a nine-factor test to determine if a worker qualifies as an independent contractor. Those factors include whether the employee has control over how the work is done, whether the business is independent and self-sustaining, and whether the work the employee does is fundamental to the employer's business.

In the lawsuit, the attorney general's office said Shipt has "virtually total control over shoppers while they do their work" by monitoring how they complete each order, setting the prices for the goods ordered, controlling customers' access to shoppers and collecting extensive data on their shoppers' work.

Shipt, which was purchased by Target in 2017, exploded in growth in 2020 when government stay-home orders during the pandemic led more people to experiment with grocery delivery services.

Though Shipt is run from Birmingham, Ala., it is deeply connected to Minneapolis-based Target. Shipt's recently appointed CEO, Kamau Witherspoon, is a former Target executive and reports to Target Chief Operating Officer John Mulligan.

Shipt's performance is lumped into Target's overall financials. However, Shipt workers do not get the same bonuses Target employees do.

In 2020, Shipt reworked its payment structure to a system the company said was based more on effort. Some workers complained they made less.

Kris Beedle, a Shipt shopper who attended Ellison's press conference, said many of the orders she completes these days don't pay enough to cover taxes, gas and other expenses.

"It doesn't make ends meet anymore," she said.