Tesla Motors has scored a victory in Ohio as it struck a deal with auto dealers allowing the automaker to continue selling its electric cars in the state.

The agreement with the Ohio Automobile Dealers Association was negotiated on Tuesday and approved by a Senate panel, and allows Tesla to keep its existing stores in the Columbus and Cincinnati areas. It also allows Tesla to open a third location in Cleveland, but prohibits the company from expanding beyond that.

At issue is Tesla's sales model. It sells cars directly to customers and uses its stores as showrooms, allowing customers to learn about the cars before making a decision. They can then purchase the car online.

Tesla operates showrooms and galleries in 21 U.S. states and the District of Columbia. It also has showrooms in Toronto, Vancouver and Montreal.

Tesla is still a small automaker, selling just 22,477 vehicles last year.

No other automaker sells directly to customers. Instead, they sell their cars through independent car dealerships.

Those auto dealers see Tesla as a threat to their business model, and have launched efforts to block the sales model in many U.S. states. Tesla has been banned from selling its cars in five states: Texas, Maryland Arizona, Virginia, and most recently New Jersey, which instituted a ban earlier this month that will go into effect April 1st.

The ban in New Jersey in particular stung the company, with founder and CEO Elon Musk writing a scathing letter on his blog attacking Governor Chris Christie for what he calls a "backroom deal"

"The rationale given for the regulation change that requires auto companies to sell through dealers is that it ensures 'consumer protection,'" Musk wrote on his blog.

"Unless they are referring to the Mafia version of 'protection', this is obviously untrue," he added, saying that Tesla operates under the direct-sales model because it gives it the best chance for success.

But even with bans in place in several states, Tesla has a workaround, although not an ideal one.

Tesla's workaround

In the five states where Tesla is banned, it operates what it calls 'galleries', which are similar to its showrooms, except employees are prohibited from discussing prices or make sales. Customers in those states who want to buy a Tesla have to do so through an out-of-state purchase, which can be costly and involves a lot of red tape, depending on the state.

In the U.S., auto manufacturers are typically not allowed to operate their own dealerships. The regulations were set up just after the Second World War as a protectionist measure to prevent General Motors and Ford, booming from their contributions to the war effort, from buying out independently owned dealers.

Tesla has nonetheless been able to secure licences to sell vehicles in much of the U.S., although depending on the state, the dealers have fought back.

In Washington and New York, proposals are being considered to ban Tesla sales.

But Tesla returned fire, and has now won the battle to sell its cars in four states: North Carolina, Minnesota, Massachusetts and now Ohio.

Ohio in particular is a big victory for the company, as it is a huge market for cars and its dealership association has a lot of power. Ohio has 830 dealerships employing 50,000 employees, and 500,000 vehicles are sold in the state annually.

In Canada, however, there are no restrictions to automakers selling directly to consumers, so the only limit for Tesla is the demand for its cars.