Michigan officials denied Tesla’s request for a dealership license, a decision that validates the state’s ban on selling new cars directly to consumers and could compel the all-electric automaker to take legal action.

The decision, which was issued by the Michigan Secretary of State’s office this week, wasn’t a surprise. Tesla confirmed in February that it had applied for a “Class A” license, which would allow the automaker to open a company-owned dealership in the state. The application enabled Tesla to test the limits of a state law that prevents it from selling vehicles there directly to consumers, the company said at the time.

The state held an administrative hearing Sept. 7 on whether to deny a dealer license to Tesla. “The license was denied because state law explicitly requires a dealer to have a bona fide contract with an auto manufacturer to sell its vehicles. Tesla has told the department it does not have one, and cannot comply with that requirement,”the Michigan Department of State said in a statement that.

Get Data Sheet, Fortune’s daily technology newsletter.

Meanwhile, Tesla’s official response explains its actions and hints at its next step.

At the urging of local car dealers and GM, Michigan law was changed two years ago to prevent Michigan consumers from buying cars from a Tesla store within the state. As part of the process of challenging the legality of that law, Tesla applied for a license in Michigan. Tesla will continue to take steps to defend the rights of Michigan consumers.

 

The company doesn’t offer any details on how it will defend those consumer rights. Tesla has two options: go to the courts or try to influence lawmakers. Legal action is the most likely course of action, considering the company has failed to muster enough support within the state legislature.

Tesla 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 Massachusetts, Missouri, North Carolina, and Washington, have tried to expand the law to include manufacturers like Tesla that don’t have franchise dealers.

Elon Musk is Upgrading Tesla’s Autopilot Feature:

Some states—such as Arizona, Michigan, and Texas—have taken an extra step and passed laws that ban direct sales. In these states, Tesla can still have a showroom, where consumers can look, but not buy, its Model S, Model X, and eventually, Model 3 vehicles. Tesla staff cannot discuss the cost of the car. They must instead direct customers to the website or a store in a neighboring state for more information.

Dealerships, which are major campaign contributors in local and state politics, have been a primary lobbying force against Tesla. In October 2014, Gov. Rick Snyder signed a bill initiated and backed by the Michigan Automobile Dealers Association that effectively bans Tesla from selling directly to consumers in the state. Automaker General Motors has also backed efforts to prevent Tesla from doing business in Michigan and other states. In February, Indiana legislators were considering a bill backed by GM that would ban auto manufacturers from directly selling their vehicles to consumers and instead require them to use the franchise dealership model used by traditional automakers. The so-called “Kill Tesla” bill was sent to a summer study committee, effectively putting it on hold.