President Francois Hollande arrived in Baghdad on Monday to meet the French forces battling the Islamic State (IS) group and to hold talks with Iraqi officials.
Speaking to French soldiers in Baghdad charged with training Iraqi special forces, Hollande said: "Taking action against terrorism, here in Iraq, is also preventing acts of terrorism on our own soil."
Hollande had come to Iraq in 2014 and remains the most prominent head of state to visit the country since the launch two and half years ago of a US-led coalition against the jihadists.
Wishing the soldiers a happy new year, Hollande said 2017 will be a year of victory, here, against terrorism.
The French president, who is travelling with Defence Minister Jean-Yves Le Drian, will also stop in the autonomous northern region of Kurdistan during his one-day visit.
France is the second-largest contributor to the US-led coalition, which has carried out thousands of air strikes against the IS group in Iraq and Syria and provided military equipment, training and advice to Iraqi forces.
Iraqi forces completely collapsed when IS jihadists took over the country's second city of Mosul in June 2014 and then swept across much of the country's Sunni Arab heartland.
The jihadists then gained more territory in August 2014, forcing hundreds of thousands of people to flee from areas that had been controlled by Kurdish peshmerga forces.
Since it joined the coalition in September 2014, French aircraft have conducted 5,700 sorties, around 1,000 strikes and destroyed more than 1,700 targets, according to defence ministry figures.
France has stationed 14 Rafale fighter jets in Jordan and the United Arab Emirates that are taking part in coalition operations.
It also has 500 soldiers training and advising elite Iraqi forces and Caesar artillery vehicles stationed south of Mosul to provide support for the ongoing operations to retake the city.
Only a handful of nations from the 60-member coalition are taking significant military action against the IS group, notably the United States, France, the United Kingdom, the Netherlands and Australia. Turkey has also been launching considerable airstrikes in Syria but many of those target Kurdish rebels instead of the Islamic State group.
Source: National News Agency