Tesla Motors (TSLA) reached an agreement with Ohio auto dealers in order to operate a maximum of three company-owned stores in the state, heading off a bill that would have banned direct sales.

The electric-car maker employs a direct-to-consumer sales model that bypasses franchised dealers, a strategy that has pitted Tesla against dealer groups around the country. New York lawmakers recently proposed a bill that would prohibit direct sales.

Tesla is currently barred from selling its Model S sedan to customers who visit stores in Arizona and Texas. As of April 1, New Jersey will become the third state to prevent the company’s direct sales. Although Tesla can’t display prices in its stores, car shoppers in those states are still able to place orders online.

In Ohio, Tesla and the Ohio Automobile Dealers Association came to a compromise, allowing  the Palo Alto, Calif.-based company to keep its two current locations and open a third.

Diarmuid O’Connell, Tesla’s vice president of corporate and business development, said the company was pleased to reach a compromise to amend the bill, which must still make its way through the state legislature.

“Tesla stores are essential to educating customers about electric vehicle technology and building a mass market for EVs,” O’Connell said in a statement.

He added that Tesla will continue to invest in the state through its stores and service centers, as well as Ohio-based suppliers.

Arizona and Texas could soon loosen their grip on direct sales as well. State legislators in Arizona are considering a bill that would pave the way for Tesla to begin in-store sales.

In an interview with FBN’s Maria Bartiromo on Monday, Texas Gov. Rick Perry said allowing Tesla to sell its cars using a direct-sales approach “really makes sense when you think about it. I think the pros are going to outweigh the cons.”

Tesla shares were trading 1.6% lower at $209.48 on Thursday morning.

Follow Matthew Rocco on Twitter @MatthewRocco