By Ed Frankl

European Central Bank President Christine Lagarde said she won't rule out leaving her position early to offer her voice in the French presidential election in 2027.

When asked by French business newspaper Les Echos if she would take part in the French political debate if geopolitical turbulence eases, Lagarde said: "It's possible."

"I believe that a European voice needs to be heard in the French presidential debate," she said in an interview published late Thursday and posted on the ECB website.

"If this debate were to reveal a more limited vision of France's place within Europe, I think it would be necessary to explain why that would be a painful path for our country and for our fellow citizens," she added.

Incumbent French President Emmanuel Macron's second term finishes next year, with contenders to replace him potentially emerging from far-left and far-right parties skeptical of more European integration. Central-bank chiefs typically steer clear of discussing politics directly.

Former Bank of France Governor Francois Villeroy de Galhau this year left his post early, allowing his replacement, Macron ally Emmanuel Moulin, to be selected before next year's presidential election.

Speaking to The Wall Street Journal in February, Lagarde dispelled speculation that she would resign early after reports that she could leave to run the World Economic Forum.

However, Lagarde repeated previous comments that she would stay on during a difficult environment for the eurozone's economy.

"Given that we are once again going through a turbulent period, I believe the captain of the ECB ship must stay on board," she told Les Echos.

The central bank last month raised its key interest rate after surging energy prices due to the closure of the Strait of Hormuz pushed inflation higher.

But some economists have argued that the ECB raised borrowing costs unnecessarily given that oil prices have returned to prewar levels after the ceasefire agreement between the U.S. and Iran.

"We are confident that we made the right choice," Lagarde said. "All the data we have received since then have confirmed our analysis."

Write to Ed Frankl at edward.frankl@wsj.com