The European Union has approved the use of weed-killer glyphosate for the next five years after a heated debate over whether it causes cancer.

Diplomats said Germany swung the vote, coming off the fence after abstaining in previous meetings to oppose its key EU partner France, which wanted a shorter licence extension.

Europe has been wrestling for the past two years over what to do with the chemical, a key ingredient in Monsanto’s top-selling Roundup, whose licence was set to expire on Dec 15.

The chemical has been used by farmers for more than 40 years, but its safety was cast in doubt when a World Health Organization agency, the International Agency for Research on

Cancer, concluded in 2015 it probably causes cancer.

The European Union agreed to roll over the licence for 18 months pending the results of a study by the European Chemicals Agency, which said in March this year that there was no evidence

linking glyphosate to cancer in humans.

Diplomats said the key swing vote came from Germany, whose government is still operating in an acting capacity following an indecisive September election. Berlin abstained earlier, but

threw its weight behind a decision opposed by France.