KASSEL, Germany (Reuters) - A German environmental regulator has given potash miner K+S limited approval to discharge waste water, ending uncertainty for the group and likely avoiding further major output disruptions that have weighed heavily on earnings.

Regulators in Germany’s Kassel district on Friday ruled that K+S can discharge up to 1.5 million cubic meters of salty waste water per year into layers of rock through 2021.

That is less than the average 2 million that K+S, the world’s fifth-largest potash supplier, had asked for, but it said the ruling should nonetheless allow its main German mining site, called Werra, to run at near full capacity next year.

“We are all pleased that this important disposal channel will continue to be available from January onwards, even if not to the extent we had requested,” Chief Executive Norbert Steiner said in a statement.

Shares in the company, which fended off a takeover approach from Potash Corp last year, rose 1.9 percent to 22.37 euros, trading near a six-month high. The stock price has gained on hopes that potash prices would recover from recent lows.

So far, discharge into the Werra river has been the only other major option to dump waste water, but K+S can only use it if the river has enough water to sufficiently dilute the salt.

The regulator also ruled the permit for waste water injection would expire for good in 2021, but K+S is planning to build a pipeline up the Werra river to dump waste water into the larger Weser river, where the salt is diluted to less harmful levels.

“I know that many jobs depend on this decision, but our utmost priority was the quality of the drinking water in the region,” Walter Luebcke, the Kassel district’s president, said at a news conference.

Under a temporary permission that expires on Dec. 31, K+S had been forced to curb production in 2016, causing an estimated financial burden of 200 million euros ($209 million). It expects output of potash products of 6.1 million tonnes this year, short of the roughly 7 million it could have extracted.

Salty waste water emerges when potash ore is processed into fertilizer products.

K+S operates in a much more densely populated area than its major rivals in Canada, Russia and Belarus, drawing opposition from local residents over drinking water quality and environmental effects.

It has already pledged to spend 400 million euros to cut salt output, such as upgrading the Werra site with technology that will reduce its waste water of about 7 million cubic meters a year by 20 percent from 2018.