Under a draft law approved by cabinet, no new permits will be granted to extract gas or oil and no existing licences will be renewed beyond 2040, when all production in mainland France and its overseas territories will stop.
The country is a minor player in the global hydrocarbons industry, extracting the equivalent of about 815,000 tonnes of oil per year — an amount produced in a few hours by Saudi Arabia.
It imports about 99 percent of its oil and gas needs.
But 39-year-old centrist President Emmanuel Macron has said he wants France to take the lead as a major world economy switching away from fossil fuels — and the nuclear industry — into renewable sources.
It plans to stop the sale of diesel and petrol engine cars by 2040 as well.
“We are the first country to take this step (phasing out fossil fuel production),” said Nicolas Hulot, the high-profile environmentalist named by Macron as minister for ecological transition in May.
“I think other countries are going to follow our path,” Hulot told AFP.
The minister later tweeted: “We are determined in the face of climate change at a time when disasters are hitting us hard.”
“Today unfortunately reality confirms every day that climate disasters are proliferating,” he said in a video unveiling the draft law. “In the United States they are talking about 100 billion dollars in damage for the last hurricane (Harvey),” he said.
The bill, which the government hopes will be passed by parliament before the end of the year, delivers on campaign pledges by Macron during his run for the presidency this year.
Above all it will affect companies searching for oil in the French territory of Guyana in South America, while also banning the extraction of shale gas by any means — its extraction by fracking was banned in 2011.
The only exceptions to the new rules will be for the capturing of gas from mines, which is considered desirable for security reasons, and one project in Guyana run jointly by oil groups Total, Shell and Tullow Oil.
Download our app and read this and other great stories on the move. Available for Android and iOS.