Luxury electric car maker Tesla has won a court battle in Massachusetts so it can sell cars direct to buyers without going through a traditional dealer.

The state's Supreme Judicial Court unanimously decieded the Massachusetts State Automobile Dealers Association and two dealers lacked standing to block direct Tesla sales under a state law designed to protect franchise owners from abuses by car manufacturers, Reuters reported.

The judge said the law was aimed at protecting dealers from unfair practices of manufacturers and distributors "with which they are associated, generally in a franchise relationship," rather than unaffiliated manufacturers.

The law "was intended and understood only to prohibit manufacturer-owned dealerships when, unlike Tesla, the manufacturer already had an affiliated dealer or dealers in Massachusetts," she decided.

"Contrary to the plaintiffs' assertion," she added, "the type of competitive injury they describe between unaffiliated entities is not within the statute's area of concern."

The dealers association had accused Tesla of operating a showroom in Natick, Massachusetts without a license and in violation of a law prohibiting a manufacturer from owning a dealership.

"We're disappointed," Robert O'Koniewski, a spokesman for the group, said of the ruling. He said the group would review what steps to take with state legislators to address "the standing gap".

Todd Maron, deputy general counsel at Tesla, welcomed Monday's decision.

"It's a great decision," Maron told Reuters. "The statute is very similar to statutes in other states. We have battles in New Jersey and other states with similar constructs, and we hope and expect the same interpretation would carry over to those venues."

Tesla is also facing similar battles in other states.