In the city that put America on wheels, in a state whose largest city is synonymous with automobile manufacturing, one auto company has been effectively boxed out.

Since 2014, a Michigan law has limited Tesla Motors’ capacity to sell in the state, after the Republican-led legislature implemented a statute that banned the company’s only method of selling its cars to consumers.

The move is part of a trend around the US to block the electric car company’s direct-to-consumer sales that cut out dealerships from the sales process. The company’s efforts to open its own dealership have been resisted by independent franchise dealers around the country, as well as the Big Three automakers.

In four states, it means customers can’t buy Tesla vehicles. In Michigan, even customers who own Tesla vehicles have to leave the state to get them serviced. And Tesla has beaten back attempts to block sales in several other states, with more battles likely to come, amid fears that they threaten to eliminate the middleman.

Tesla took its strongest stance last month to challenge the prohibitions by filing a lawsuit against Michigan, a move that experts called a “last resort” maneuver. The lawsuit is the first to be filed by the company in federal court, following several previous legal pursuits at the state level against prohibitions of its sales model.

“The new law was immediately recognized by the public for what it was: a highly protectionist, dealer-driven law intended to shut Tesla out of Michigan,” the 24-page complaint stated.

Tesla sells cars directly to consumers in 23 states and Washington DC. But the company says it cannot secure a license to sell its electronic vehicles in four states, including Texas, Connecticut and Utah, where it is now waging legislative and legal battles.

The company’s most high-profile battle was won in Massachusetts, where, in 2014, that state’s supreme court tossed out a lawsuit by the Massachusetts State Automobile Dealers Association that sought to block Tesla sales under a state law designed to protect dealers from being undercut by manufacturers.

It’s those kinds of laws that Tesla is seeking to invalidate. The company said in a statement that “giving auto dealers a monopoly on car sales benefits them, but harms consumers”. The company said that sentiment is shared by the Federal Trade Commission. Indeed, in a 2015 letter to Michigan lawmakers, members of the commission said they had no opinion on whether the traditional model of selling vehicles through a dealer is superior or inferior, but they believed “consumers are the ones best situated to choose for themselves both the vehicles they want to buy and how they want to buy them”.

The letter urged the Michigan legislature to abandon the prohibition of direct sales for automobiles, and “instead permit manufacturers and consumers to reengage the normal competitive process that prevails in most other industries”.

“Such a change would facilitate the development of new methods of distribution,” the letter said, “benefiting the motor vehicle buyers of Michigan.”

A spokesperson for Michigan’s governor, Rick Snyder, declined to comment on the lawsuit, but said the governor has previously stated he was “willing to work with Tesla in various ways within the laws of the state”.

In 2014, the top automakers’ home state passed a law that amended language overseeing motor vehicle manufacturers, distributors, wholesalers and dealers, by one word: “its”. In doing so, Tesla says, Michigan law now requires any manufacturers to exclusively use franchised dealers – a move that directly flouted the company’s sales model.

Tesla says the traditional model of selling through a dealer doesn’t jibe with the reality of a consumer’s needs with electric vehicles.

“The public remains largely unfamiliar with, and often skeptical of, electric vehicle technology,” the company said in the suit. “Accordingly, Tesla’s retail operations are tailored to address the concerns of consumers considering the transition to electric vehicles, as well as to showcase Tesla’s products and services.”

The decision to file a constitutional challenge over direct sales in federal court represents a “last resort” for Tesla, said Daniel Crane, a law professor at the University of Michigan who has written extensively about the company’s legal battles.

“The decision was always, when do you sort of bring out the heavy guns of the constitutional challenge,” Crane said. “Obviously, the benefit of the constitutional challenge is you set a precedent that benefits the rest of the country.”

But if the company loses, he continued, “it takes away something you might have in your back pocket that helps you with negotiations with car dealers”.

“I think they were rightfully reluctant to sort of pull the trigger on the constitutional challenge until it was the last resort,” he said.

The company also says Michigan’s law prevents it from opening a service facility for Tesla vehicle owners in the state. Currently, the closest service centers from Michigan are located in Cleveland and Chicago, the company says. According to the lawsuit, the state has yet to rule on the company’s request for a license to service vehicles – nearly 11 months after first submitting its application.

Crane, a staunch critic of the Michigan law and how the amendment was passed by the state legislature, said Tesla’s suit may prove challenging as it’s “a matter of constitutional law” and will probably turn on a federal judge’s willingness to strike down a state statute.

He continued: “If it comes down to [the state of Michigan] actually having to put down evidence to defend this thing, I’m every bit skeptical they have a single good argument.”

Messages were left with Michigan’s attorney general, Bill Schuette, and state secretary, Ruth Johnson, both of whom are also named as defendants, seeking comment.