EU countries have voted to renew the licence of glyphosate, a widely used weedkiller at the centre of environmental concerns.
The proposal at the EU Commission's Appeal Committee received 18 votes in favour and nine against, with one abstention, ending months of deadlock.
The Commission says the new five-year licence will be ready before the current one expires on 15 December.
However, France plans to ban the use of glyphosate within three years.
In a tweet, French President Emmanuel Macron said he had ordered a ban on the use of glyphosate in France "as soon as alternatives are found, and within three years at the latest".
Glyphosate is marketed as Roundup by the US agrochemical giant Monsanto.
One UN study called the chemical "probably carcinogenic", but other scientists said it was safe to use.
The UK was among the states in favour of glyphosate renewal. Germany and Poland were also among them - though they had previously abstained.
France and Belgium were among the states that voted against. Portugal abstained.
The EU Commission says the current proposal on the weedkiller "enjoys the broadest possible support by the member states while ensuring a high level of protection of human health and the environment".
Glyphosate was introduced by Monsanto in 1974, but its patent expired in 2000, and now the chemical is sold by various manufacturers.
The European Food Safety Authority (EFSA) says glyphosate is unlikely to cause cancer in humans.
Critics say widespread use of glyphosate reduces biodiversity, by killing plants that are essential for many insects and other animals.
Some countries and regions have banned glyphosate use in public parks and gardens. Its effect on plants is non-selective, meaning it will kill most of them when applied.
Read more on farm chemicals:
How does glyphosate work?
It is usually mixed with other chemicals that help it get into plants, where it blocks a key enzyme pathway. The disruption prevents plants from making certain proteins needed for their growth.
The "shikimate pathway" involves seven enzymes, which enable the plant to form amino acids, the building blocks of proteins. The pathway is not found in animals.
Some crops, such as soybean, have been genetically modified to resist glyphosate.
Farmers spray it on fields before their crops emerge in spring, so the crops do not have to compete with weeds.
Some also use it as a pre-harvest treatment to dry out crops and make them easier to harvest. The UK Soil Association says such use is risky, as it can increase glyphosate residues in food.
How widespread is it?
It is described as the world's most popular weedkiller. In the US, more than 750 products contain it.
Glyphosate use worldwide has risen almost 15-fold since 1996, when so-called "Roundup Ready" crops, genetically engineered to resist glyphosate, were introduced.
A 2016 study by Environmental Sciences Europe notes growing concern about intensive glyphosate use, because some plants have developed resistance to it - meaning that farmers tend to use even more of the herbicide.
Sri Lanka banned use of glyphosate in 2015 - though the tea industry opposes the ban. In 2015 too Colombia stopped aerial spraying of glyphosate - even though it had been used widely to kill illegal coca plants.
What is the effect on humans?
Glyphosate's toxicity is reckoned to be low, in the concentrations used by farmers, although the UN International Agency for Research on Cancer called it "probably carcinogenic".
The European Commission says that besides EFSA, the European Chemicals Agency and other scientific bodies found no link to cancer in humans.
The Soil Association says glyphosate traces are regularly found in bread.
According to the US National Pesticide Information Center, the chemical mostly passes through the body quickly in urine and faeces.