Eleven years after refusing to follow Britain and the United States into Iraq, France is now trying to take centre stage in a country overrun by jihadists with a leading diplomatic -- and possibly military -- role.
Just days before an international conference in Paris on peace and security in Iraq, French President Francois Hollande on Friday visited Baghdad, pledging "support and solidarity" for the country's embattled government.
"I came here to Baghdad to state France's availability in providing even more military assistance to Iraq," Hollande said.
It was the highest-profile visit to Iraq since militants led by the Islamic State (IS) group overran large parts of the country in June and sparked international concern over an expanding jihadist threat.
"I want relations between Iraq and France to take on a new dimension and that is the reason for my presence here," Hollande said.
France has already provided arms to Kurdish fighters in Iraq battling jihadists as well as humanitarian assistance to threatened Christians and Yazidis, a Kurdish ethno-religious minority in northern Iraq.
It is making its presence felt in a country with which it had ambiguous ties during the regime of former dictator Saddam Hussein, toppled by the Anglo-American invasion of 2003.
"Our national security is at stake and that is why we are intervening. We cannot allow an Islamist sanctuary to be formed just five hours' flying time from Paris," said a French diplomat, speaking on condition of anonymity.
France's prominent role has reassured many in the region and beyond who have been worried by US air strikes launched on August 8 against IS fighters in Iraq.
US President Barack Obama vowed this week to expand operations into Syria and the Pentagon said combat aircraft would soon start flying out of a base in the Kurdish region of Iraq.
"In 2002-3 France was right in refusing to join the war and predicting the consequences of the intervention: that it would become a training ground for Al-Qaeda which had not been present there before the fall of Saddam Hussein's regime," said Karim Emile Bitar, a researcher at the Paris-based Institute of International and Strategic Relations think-tank.
France rejects secondary role
The United States only decided to act when US interests were directly threatened in Iraq, with the advancing jihadists threatening Arbil, the capital of the autonomous Kurdish region which is home to many US citizens.
The beheading of American journalists James Foley and Steven Sotloff by IS fighters also prodded Washington into action.
But Obama's objective to build a broad coalition to defeat IS, which has declared a "caliphate" straddling Iraq and Syria, is riddled with question marks, including whether to include Iran -- the main backer of Syrian leader Bashar al-Assad who is a pariah as far as the West is concerned.
"Nothing can take place in Iraq without the approval of Iran," said Denis Bauchard from the French Institute of International Relations.
Iraq's ruling Shiites are very close to the Tehran regime and stand accused of marginalising the Sunnis to the point of throwing them into the arms of the jihadists.
But whatever the coalition, Paris, unlike Washington, appears keen to obtain international legal legitimacy for any military engagement in Iraq.
It has said it will only take part "if necessary" in air strikes on Iraq. It has six Rafale fighter jets and just under 1,000 soldiers based in the United Arab Emirates and could even mobilise an aircraft carrier, the Charles
"Any such participation must be efficient and targeted," said a French official, speaking on condition of anonymity. "We must maintain a degree of autonomy.
"We don't want to be the subcontractors of the Americans."
But France has so far refused to follow in the footsteps of the United States which has promised to "destroy" the IS in Iraq and in Syria.
"They are not the same crises" and "we must not mix the two even though the IS is present in both countries," the French official said.
A year ago, Paris had been set to launch air strikes on Syria against the Assad regime but refrained after the United States held back.
Paris now fears that any strikes against the IS in Syria will help Assad's troops on the ground and perhaps lend legitimacy to his regime.
"Any intervention in Iraq would be last resort," said Bitar.