Tesla's battle with dealership owners is coming to a head in New York, where legislators are considering a bill that would block the electric-car maker from directly selling vehicles in the state.

Tesla said in a statement Friday that if the bill passes, it will be "put out of business in New York," with all employees in the state losing their jobs.

"The bottom line for New York consumers and New York suppliers is that if this bill passes, special interests in Albany will once again have gotten their way while robbing New Yorkers of choices in the marketplace," Tesla (TSLA) said.

The current legislative session was originally scheduled to conclude on Thursday, but work continued in both the Senate and Assembly on Friday, and it is unclear when it will end.

Related: Tesla unveils 90-second battery-pack swap

CEO Elon Musk took to Twitter Friday as legislators were considering the bill, urging New Yorkers to call their representatives and ask them to vote it down.

The New York State Automobile Dealers Association did not respond to a request for comment, though the association is also urging supporters to contact their representatives, saying the pending bill is "designed to maintain the health and vitality of New York's retail automobile industry."

Tesla has tangled with dealership associations in a number of states in its effort to sell its Model S electric sedan directly to consumers rather than using franchised car dealers.

General Motors (GM), Ford (F), Toyota (TM) and others don't sell cars to customers. They sell to independently owned and operated dealers or distributors who, in turn, sell them to the public, usually after some negotiation over the final price.

Tesla's showrooms, by contrast, are owned and operated by the company. Most are in shopping malls, with only enough cars on hand for display and test drives. Every Tesla car sells at full sticker price, and service on the cars is performed at separate garages owned by Tesla.

Auto sales are mostly regulated at the state level. In some states, Tesla has had little or no problem opening its stores. In others, auto dealers and their allies in government have resisted Tesla's plans, fearing they could ultimately undermine the system of franchised dealers.

Earlier this month, legislators in Texas failed to vote on a bill backed by Tesla that would have loosened the state's restriction on dealerships owned by automakers. Virginia rejected the electric-car maker's dealership application earlier this year.

Dealers argue that the traditional franchise system is best for car buyers because it preserves competition between dealerships selling the same products.

But Tesla worries that traditional franchised dealers, who also have gasoline cars to sell, won't represent its products properly or aggressively enough. Dealers pressed to make quick sales will likely be tempted to steer customers to gasoline cars rather than explain the benefits of the Model S, Diarmuid O'Connell, Tesla's vice president for business development, told CNNMoney last month.

"From the beginning, Tesla's goal has been to catalyze the market for electric vehicles, and selling through intermediaries at this stage of the company will not work," Tesla said Friday.