Tesla has been ordered to stop work on its German factory, in a win for environmental campaigners.

A court ruled that the electric car company must stop clearing forest land near Berlin to prepare for the construction of the facility, its first so-called "gigafactory" in Europe.

Planning permission has not yet been granted on the site, and a complaint has been brought by a local environmental group, the Gruene Liga Brandenburg (Green League of Brandenburg).

The injunction, which was handed down by the higher administrative court for the Berlin and Brandenburg region, is a temporary measure ahead of further hearings, expected to take place this week.

The protesters argue that the factory poses a threat to local wildlife and water supplies.

"It should not be assumed that the motion seeking legal protection brought by the Green League lacks any chance of succeeding," the court said in a statement.

On Twitter Jörg Steinbach,Minister of Economy and Energy of the State of Brandenburg, said the state environment agency and Tesla had already responded to the court.