Tesla Motors, the high-performance electric car company headed by PayPal co-founder Elon Musk, has won another legal skirmish in its quest to sell cars directly to consumers.

On Monday, Massachusetts’ top court ruled that car dealers in the state had no right to sue Tesla (NASDAQ: TSLA) for its direct-sales model, which cuts out any middlemen in the car-buying process.

Like many states, Massachusetts has laws that ban car manufacturers from owning dealerships that compete with independent dealers. When they were put into place, those rules were typically meant to stop Ford, General Motors, and the like from collecting franchise fees from a local dealer and then setting up shop themselves, undercutting the franchisee on price.

Car dealers across the country have started tapping into those laws in an effort to stop Tesla from selling its cars directly, cutting out any dealers in the process. They’ve had mixed success as state legislators try to balance the realities of local jobs and political clout with the need to foster innovative companies, particularly ones that make cleaner cars.

Monday’s ruling by the state’s Supreme Judicial Court was a clear loss for Massachusetts dealers. The law says car dealers can only sue a manufacturer if they’re already affiliated with that manufacturer—so, if you sell GM cars and GM decides to open its own dealership, you could take them to court.

But since Tesla doesn’t have any dealers in the state, the court said, it doesn’t have any franchise partners to undercut—so there’s no dealers who can sue it for unfair practices. Dealers who sell other kinds of cars can’t sue Tesla simply to preserve the franchise model, the court said.

“Their claimed injury is that they will be at a disadvantage competing with [Tesla],” the court wrote. “Contrary to the [dealers’] assertion, however, the type of competitive injury they describe between unaffiliated entities is not within the statute’s area of concern.”

The legal and political fight may not be over, though. Both sides have sought to get more specific protection from the state Legislature, so far with no progress. With today’s court loss, auto dealers may have to either give up the fight or try again to get the law changed.

If they do, it’s pretty clear that Tesla will be there fighting back.

Trending on Xconomy