NATO will take "some personnel" out of Iraq because of the increased danger after the US assassination of an Iranian general triggered revenge threats.

The withdrawal is temporary but "the safety of our personnel is paramount," a NATO official said in a statement on Tuesday.

More:

US and allied foreign troops in Iraq are concerned they might be targeted by Iran or allied Iraqi militias in retaliation for Friday's killing.

At the command of US President Donald Trump, the US military killed Qasem Soleimani, who headed the Quds Force, commanding Iran's operations across the Middle East, in a drone attack at Baghdad airport.

NATO announced on Saturday that it had suspended its training mission in Iraq, which fields 500 instructors.

The NATO official said other mission personnel were being moved to other parts of Iraq, and emphasised that "NATO maintains a presence".

The alliance plans to resume its training there "when the situation permits".

He declined to give details on how many personnel were being moved or to where.

"The temporary repositioning of some personnel [was] to different locations both inside and outside of Iraq. To protect the safety of our personnel on the ground, we cannot go into operational details," he added.

Romania's defence ministry said separately that its 14 soldiers taking part in the NATO deployment "will be temporarily relocated to another coalition base".

Hungary's defence minister Tibor Benko said Hungarian soldiers in Iraq were ready for evacuation "if necessary", the official MTI agency reported.

Benko added that unless Hungary's soldiers were asked to withdraw, they would continue their mission.

Around 200 Hungarian soldiers are stationed in the northern Iraqi city of Erbil, both as part of NATO's training mission and the broader coalition against the ISIL (ISIS) organisation.

The NATO training mission in Iraq, set up in 2018, is separate to the far bigger foreign military deployment in the country led by the US, which has 5,200 soldiers stationed in Iraqi bases.

Some of the estimated 500 Canadian troops in Iraq will be moved temporarily to neighbouring Kuwait in the coming days to ensure their safety amid rising tensions in the region, a top Canadian military official said Tuesday.

General Jonathan Vance, chief of defence staff, announced the "operational pause" in letter posted on Twitter to families of deployed military personnel.

"Over the coming days, and as a result of Coalition and NATO planning, some of our people will be moved temporarily from Iraq to Kuwait. Simply put, we are doing this to ensure their safety and security," he wrote.

A letter from William H Seely III, the commander of the US task force in Iraq, to his Iraqi counterpart dated Monday had said the US-led coalition would be "repositioning forces over the course of the coming days and weeks to prepare for onward movement".

Many media outlets initially reported that was formal notice that the US was withdrawing forces on Iraqi soil.

US Defense Secretary Mark Esper has since clarified that there are no plans for American troops to leave Iraq.