The North Carolina Department of Motor Vehicles has denied Tesla Motors' application to sell its electric cars at a new store near Charlotte.

State law says automakers can't sell their cars directly to consumers, unless they get an exception and show it's in the public interest. That’s what Tesla tried to do. But nearby dealers objected. So did the state auto dealers association.

The Palo Alto, Calif.-based automaker sells only through its own stores or online. The company has a showroom on East Independence Boulevard in Matthews, where product specialists can talk about the cars and provide test drives. But under state law, they can't take orders or deposits.

So in January, Tesla applied for permission to turn the Matthews showroom into a store.

After the dealers objected, the DMV held a two-day hearing earlier this month in Matthews.

In siding with the dealers, DMV hearing officer Larry Green said Tesla failed to make its case for an exception. Among other things, he decided that three of the four dealers who were willing to sell Tesla’s cars are qualified to do so.

The dealers' lawyer, Shawn Mercer of Raleigh, would not comment Wednesday.

Dan Whittacre, an assistant director of the DMV, said Tesla can appeal to the DMV commissioner. Further appeals would wind up in court, he said.

Tesla declined to comment or say if it plans to appeal.

Three years ago, Tesla opened its first North Carolina store in Raleigh. At the time, there were no objections from local dealers and no DMV hearing was held.

The company also has faced opposition in other states that have strong dealer-protection laws. The issue is critical as the company readies production of the Model 3. It has about 400,000 orders for the car, which is supposed to be available in 2017, and needs a way to distribute those cars to consumers.