A German court has rejected a lawsuit from an environmental group which sought to bar carmaker Mercedes-Benz from selling vehicles with combustion engines that emit greenhouse gases after 2030.

The state court in Stuttgart, where Mercedes-Benz Group is based, said it is up to legislators to decide what measures should be taken against climate change, German news agency dpa reported.

Judges said that such decisions cannot be pre-empted by an individual suit in a civil court.

The Deutsche Umwelthilfe group had sought to have Mercedes-Benz ordered not to sell cars with emissions-causing combustion engines after the end of October 2030.

It also wanted the car giant to refrain from selling new cars with combustion engines before that date that would emit a combined total of more than 516 million tonnes of carbon dioxide.

Deutsche Umwelthilfe said it plans to appeal to a higher regional court, arguing that politicians’ inaction has forced it to take legal action.

Mercedes-Benz welcomed the ruling.

It said there is no question over the protection of the climate being one of the greatest challenges in human history, and that the company is standing by its responsibility and has long since set course towards climate neutrality.