Tesla has reached a deal with Michigan that will allow the company to sell its cars directly in the state, bringing a multiyear legal battle to an end. It’s a small but crucial victory for Tesla, and one that comes in the home state of the automotive industry.

Thanks to a state law that forces automakers to work with dealers to sell their vehicles, would-be Tesla customers in Michigan have had to travel to neighboring states to buy one of the company’s vehicles. Tesla owners had to do the same to get their vehicles serviced.

But that will now change. The Michigan attorney general’s office announced Wednesday morning that it reached an agreement with Tesla to dismiss a lawsuit filed by the company in 2016 over the state law. (Tesla sued after the state denied it a dealership license.) While Michigan is not repealing the law, it is essentially admitting that there’s enough wiggle room in the language to allow Tesla to sidestep dealer networks and sell directly to consumers moving forward.

Tesla sued the state in 2016 over its direct sales ban

Tesla will now be able to make deliveries to customers in Michigan, and also walk customers through the buying process at its lone showroom in the state — something it was previously unable to do. The company will also likely open more showrooms and service centers as a result.

There are small caveats to all this, though. Cars sold in the state will have to come with out-of-state titles in order to get around the language of the law. That means customers in Michigan will have to go through the process of transferring the title if they want the car to be titled in their home state. And any service centers Tesla opens in Michigan will have to be owned by a subsidiary.

While it may seem like a strange way to compromise, Dan Crane, a law professor at the University of Michigan, believes it may have been the only way for the state to save face.

“What happened here is I think the Michigan attorney general realized that going through this trial would be embarrassing for the state,” he said.

Instead, Crane said, the state decided to “settle in a way that lets Tesla do what it wants to do, but gives the appearance of complying with Michigan law.”

“The Michigan attorney general realized that going through this trial would be embarrassing.”

Will Zerhouni, who wrote an analysis of Tesla’s legal fight with Michigan for the Cato Institute in 2018, agreed — though he’s not sure the state went far enough.

“The settlement shows that Michigan saw its position as untenable and potentially indefensible at trial,” wrote Zerhouni, who is now a founder and partner at Mighty Stream Capital Management LLC, a new firm focused on impact investing and litigation finance. “Instead, the state, which couldn’t rescind validly passed law on its own, settled in a way that read onerous and anticompetitive (and potentially unconstitutional) restrictions out of that law. That is all to the good — but it would be better if the state (and others) did away with the charade and repealed the law altogether.”

The decision to dismiss Tesla’s lawsuit, once it’s approved by the court, will not just make it easier for Tesla to sell its cars directly to consumers, but could help other automakers as well, according to Crane and Zerhouni.

“Consumers are used to e-commerce and direct-to-consumer sales these days, and are starting to expect to be able to buy cars this way. It’s going to be hard to hold back the floodgates,” Crane said.

“The settlement is technically only an agreement between Tesla and Michigan,” Zerhouni said. “It would, however, be very hard for Michigan to say that they are going to interpret the statute differently for other automakers.”

“It’s going to be hard to hold back the floodgates.”

The decision could also put pressure on other states that have resisted allowing car companies to sell directly to consumers, like Connecticut and Texas, according to Crane.

“Michigan really is a momentum-shifter on this, and it’s going to be increasingly hard for state legislators to convince consumers why they can’t do what everyone expects to be able to do,” he said.

Dealer organizations could try to stand in the way of these changes, possibly by suing the state itself over this new interpretation of the law, Crane said. (Michigan’s dealer association told The Verge it is “still reviewing” the decision, and the National Automobile Dealers Association did not immediately respond to a request for comment.) Still, he doesn’t see them winning out in the end.

“These are legacy statues that came from a much different time, 40, 50 years ago,” Crane said. “The world has changed in so many ways.”