Electric car maker Tesla will be allowed to sell its vehicles in the US state of New Jersey, after a ban on direct-to-consumer sales was lifted.

The company has been prevented from doing business in some US states due to laws that require cars to be sold through franchised dealerships.

Governor Chris Christie signed legislation allowing Tesla to operate at four sites in the New Jersey.

The law mandates that Tesla provide servicing facilities in the state.

In many parts of the US, cars must be sold through registered dealerships.

The legislation, which was put into place at at time when small local dealers were perceived as vulnerable to the moves of major national manufacturers, has recently been challenged by many carmakers and consumer-rights groups.

After Tesla challenged the law in New Jersey, lawmakers approved an amendment allowing zero emission car manufacturers to operate dealerships in the state.

"I said last year that if the legislature changed the law, I would sign new legislation put on my desk and that is exactly what I'm doing today," said Mr Christie.

"We're pleased that manufacturers like Tesla will now have the opportunity to establish direct sales operations for consumers in a manner lawfully in New Jersey."

Reacting to the news, Tesla tweeted: "A huge victory in New Jersey for consumer choice: We are open for business!"

The firm still faces bans in Michigan, Texas, Arizona and Connecticut.

While Tesla still has showrooms in those states, customers cannot buy vehicles at the sites, or discuss prices.