CASCADE TOWNSHIP, Mich. (AP/WOOD) — Tesla is suing Gov. Rick Snyder and other state officials, challenging a 2014 law that ensures automakers can only sell through franchised dealerships.

The federal lawsuit filed Thursday seeks a declaratory judgment that the “anti-Tesla” law is unconstitutional and an injunction to prevent its enforcement.

In the 24-page filing, Tesla called the legislation “particularly egregious” and “protectionist” and said lawmakers passed the direct sale ban “covertly,” bypassing the public notice and comment process.>>PDF: Tesla Motors lawsuit

The state last week denied Tesla’s application for licenses to sell directly to consumers and to service vehicles in Michigan, citing the law that is backed by big auto companies and their dealerships.

Tesla Motors Inc. says it prefers that new legislation be enacted but was told recently by lawmakers that no hearing will be held. Tesla says it will “fight for the rights of Michigan consumers to be able to choose how they buy cars in Michigan.”

A spokesman says Snyder doesn’t comment on pending lawsuits.

Tesla opened its only facility in the state in Cascade Township last year.