Tesla is suing the state of Michigan in federal court in hopes of reversing a law that prevents the automaker from selling its electric cars there.

The Palo Alto-based automaker filed a lawsuit Thursday in U.S. District Court Western District of Michigan Southern Division. The lawsuit comes just a week after Michigan officials rejected Tesla’s request for a“Class A” license, which would have allowed the automaker to open a company-owned dealership in the state. Tesla applied for the license to test the limits of a state law that prevents it from selling vehicles there directly to consumers, the company said back in February.

Tesla tsla has a different business model than other automakers. It sells its own cars directly online and through its own branded stores, not through franchised dealerships. All U.S. states have laws that prevent automakers with existing franchisees from opening their own dealerships to compete with them. However, dealer associations in a number of U.S. states, including have tried to expand the law to include manufacturers like Tesla that don’t have franchise dealers. Tesla has not been able to get a license to sell directly to consumers in Michigan, Texas, Connecticut, and Utah.

 

 

In October 2014, Gov. Rick Snyder signed a bill initiated and backed by the Michigan Automobile Dealers Association that effectively banned Tesla from selling directly to consumers in the state.

Get Data Sheet, Fortune’s daily technology newsletter.

Tesla says the law was passed to give give local auto dealers a state-sponsored monopoly on car sales in Michigan. “As a result of this law, Michigan consumers are forced to accept reduced access to the products they want, less competition and higher prices,” Tesla said in an emailed statement.

Tesla insists that it prefers to solve the problem legislatively, but says the response from the state legislature has forced the company to take legal action.

Again, from Tesla:

Unfortunately, the local auto dealers and local manufacturers have made clear that they oppose any law that would allow Tesla to operate in Michigan. Given their position, the leadership of the Michigan legislature recently informed Tesla that it will not even hold a hearing to debate the issue. As one leading legislator told Tesla: The local auto dealers do not want you here. The local manufacturers do not want you here. So you’re not going to be here.

In the lawsuit, Tesla accuses General Motors gm of using its considerable influence in the state to help push the so-called Anti-Tesla bill through the legislature.

A spokesman at Gov. Snyder’s office said in an email the state doesn’t comment on pending lawsuits.

Updated at noon ET with a comment from Office of Michigan Gov. Rick Snyder.