A German court ruled Thursday that auto giant Mercedes-Benz knowingly installed emissions-cheating devices in some diesel vehicles, opening the door for owners to seek compensation.

The carmaker rejected the ruling and said it planned to appeal to Germany's top court.

The "dieselgate" scandal, which involved claims of rigging emissions levels, first rocked Volkswagen in 2015 and then spread to other carmakers.

In the case against Mercedes, the VZBV federation of German consumers filed a lawsuit in 2021 in an effort to help owners of the auto giant's vehicles claim damages.

The case covered various models from the Mercedes GLC and GLK ranges that were subject to recalls.

In its ruling, the superior regional court in Stuttgart found in favour of some of VZBV's claims.

It found that Mercedes staff deliberately fitted unauthorised devices to rig emissions levels in some models, although it rejected similar claims concerning others.

So-called defeat devices fitted in the vehicles made them appear less polluting in lab tests than they were on the road.

The VZBV, which was representing more than 2,800 people in its legal action, hailed the court's ruling.

"The course has now been set for important claims for damages," the group's Ronny Jahn said.

Individual vehicle owners can now pursue claims for damages themselves.

But Stuttgart-headquartered Mercedes said in a statement that it believes "that the claims asserted against our company are unfounded and we will defend ourselves against them".

The carmaker also noted that car owners can only pursue their claims once its appeal has wrapped up.

It was not immediately clear how much Mercedes might have to ultimately pay out, or how many vehicle owners may seek to claim compensation.

"The decision also sends a positive signal to hundreds of thousands of Mercedes owners who, independently of the model (legal action), can assert claims for compensation," said German consumer lawyer Claus Goldenstein, who represents over 65,000 claimants in emissions-cheating cases.

The "dieselgate" saga shocked Germany and was seen as one of the country's biggest post-war industrial scandals.