K+S has been trying to come to terms with local communities and environmentalists, who are fighting its practice of injecting salty waste water - a byproduct of processing potassium ore into fertiliser products - into porous layers of rock.

Limits imposed by regulators crimped output and earnings in 2016 but a landmark ruling last December allowed K+S to discharge up to 1.5 million cubic metres of waste water per year into layers of rock through 2021, ending months of uncertainty and production outages.

"K+S receives legal security for its existing injection permit," the group said in a statement on Monday, adding it would seek closer dialogue with BUND to avoid further disputes.

K+S, whose shares were up 0.2 percent at 19.68 euros at 0940 GMT, also committed to not renewing a permit for deep-well injection that expires in 2021, thanks to a 180 million euro (£160.87 million) water treatment plant it plans to bring onstream next year.

"Judicial disputes are to be avoided as far as possible in the future," the miner added.

The deal is contingent on a normal water level of the Werra river, which is an alternative discharge route for its waste water.

Negotiations are ongoing with another plaintiff, the municipality of Gerstungen, a company spokesman said.

(Additional reporting by Patricia Weiss; Editing by Arno Schuetze and Mark Potter)

By Ludwig Burger