The showdown between Tesla and Texas dealers is over -- for now -- with Tesla founder Elon Musk suffering his second straight setback in his fight to sell electric cars directly to consumers.

Tesla-backed bills that would have created an exemption to current state law restricting factory-owned dealerships failed to make it to the floor of the Texas House or Senate for voting. The Legislature's regular session ended Monday, May 27, and it won't meet again in a general session until 2015.

"The Legislature did the right thing," said Karen Phillips, general counsel of the Texas Automobile Dealers Association, which opposed the legislation.

Tesla didn't respond to a request for comment.

The Tesla bills were introduced in March in the company's most direct challenge to state franchise laws. Tesla has retail locations in Houston and Austin, but staffers are prohibited from sales activity.

The Texas battle came after Tesla won a legislative round in Minnesota. The company also won court decisions in dealer lawsuits in Massachusetts and New York.

But in late April, Tesla's bid for a dealership license in Virginia was rejected. The company is also fighting legislation in North Carolina that would prevent it from using the Internet to sell to customers.

If state-level losses stack up, Musk has said he will consider seeking action on the national level, either through federal legislation in Congress or a federal lawsuit.