Tesla Motors and New York State have reached an agreement that will allow the automaker to avoid the potential closure of its state stores over their failure to comply with dealership laws, as has happened elsewhere across the country. Under the agreement, Tesla will be able to continue operation of its five existing stores in the state, which sell cars directly to consumers, but all future stores will have to comply with a new law governing car dealerships — though the specific legislation has yet to be introduced.

Five stores remain open, further stores must comply with a new law

Car dealerships have largely been seen as taking advantage of older laws banning direct vehicle sales to consumers in order to force Tesla's sales floors out of the market. Tesla has been predictably displeased with these laws — which have banned its sales in Texas, Arizona, Virginia, and most recently New Jersey — but it seems to have come around to bargaining for the sake of not losing them altogether. It also received a short reprieve in New Jersey today, allowing it some additional time there as lawmakers try to accommodate its sales style.

Tesla reached a similar deal this week in Ohio, allowing its existing stores to remain open and for it to open one more. Legislation still has to be passed in New York for today's agreement to take effect, but it has bipartisan support and the backing of two New York auto dealer groups and Governor Andrew Cuomo, so it appears to be a sealed deal. "The agreement is a win-win for consumers, for the franchised auto dealers and manufacturers who play such a vital role in New York's economy, and for cutting edge companies like Tesla," Cuomo says in a statement.

Further details of the new legislation were not released, including what rules new Tesla stores will have to comply with. Tesla has repeatedly said that its method of selling vehicles directly to consumers is necessary so that it can properly explain the workings and benefits of electric cars, which consumers may not be as familiar with. It's not clear how or if it'll be able to continue that practice in the future, but with other states showing that they're willing to pass or enforce laws that could stop Tesla's sales floors entirely, it may be increasingly willing to find a compromise.