Berlin has been ordered to restrict the movement of diesel cars within the city, to reduce air pollution.
The German capital is expected to introduce exclusion zones, like those in Frankfurt, Stuttgart and Hamburg.
A ban on diesel vehicles up to and including the Euro 5 standard must be active in Berlin by the end of March 2019, according the court ruling.
At least 11 road sections are likely to be included in the plans, with around 200,000 cars affected.
The case was brought by German environment and consumer protection organisation Deutsche Umwelthilfe (DUH).
DUH CEO Jürgen Resch said: “The judge has delivered an unambiguous ruling, confirming that diesel bans are necessary in Germany’s capital. The court has also condemned the government’s diesel deal as ineffective. It should have included all 115 German towns and cities affected by illegal levels of air pollution, and required hardware retrofits for all Euro 5 and Euro 6a-c vehicles.
ClientEarth clean air lawyer Ugo Taddei added: “We expect to see several more German courts order bans before the year is out.
Recent data submitted by the German government to the European Commission showed that pollution across Germany remains far above legal limits.
According to lawyer Peter Kremer, who represented DUH in the proceedings, the judge confirmed that beyond just meeting a regional average, the air in every part of a town must be safe to breathe. The court also said that if Berlin failed to implement street-by-street bans, a citywide ban would become unavoidable.