Germany is reducing its troop numbers in Iraq for security reasons after the death of the Iranian general Qassem Suleimani in a US drone strike in Baghdad last week.

It is the first coalition withdrawal since the Iraqi parliament voted on Sunday to call for the withdrawal of US forces from the country. The non-binding resolution has prompted a chaotic response from US officials.

The German decision underlines the extent to which the assassination may have weakened the years-long efforts of the coalition forces to fight Islamic State in Iraq and Syria. Nato has already announced that all training of Iraqi forces has been suspended.

Germany said its two bases in Baghdad and Camp Taji, north of the Iraqi capital, in particular would be “temporarily thinned out”, with the forces transferred to Jordan and Kuwait. It said the transfer had been agreed with the US-led coalition.

Nato also announced it was moving an unspecified number of its troops out of Iraq temporarily. Nato had announced on Monday it was suspending operations training Iraqi forces.

Canada announced it was moving some of its 500 troops based in Iraq out of the country and sending them to Kuwait. The Canadian chief of defence staff, Gen Jonathan Vance, said in a letter to families of Canadian service personnel that it was best to pause work in Iraq to concentrate its efforts on the security of its soldiers.

UK sources confirmed on Tuesday morning that about 50 British personnel had been relocated out of Baghdad’s secure Green Zone, either to nearby Taji or out of the country. Meanwhile, about 20 military planners have flown in to help prepare for different scenarios, ranging from a deepening of the conflict with Iran to a full departure from the country.

The redeployment – which has already been completed – means the UK’s overall contribution to coalition troop numbers in Iraq remains at about 400, with the majority based with Australian forces at Taji. British forces stopped training Iraqi soldiers in countering Isis terrorism on Sunday and the forces are focused on “force protection” – defending themselves from local reprisals, particularly pro-Iran militias.

The French president, Emmanuel Macron, had a one-hour phone call with the Iranian president, Hassan Rouhani, in a desperate attempt to prevent Iraq taking retaliatory military action.

The conversation included a further French plea for the Iranians to reconsider their plan to withdraw from all their substantive commitments under the nuclear deal. Iran said on Sunday it was withdrawing from all the commitments except allowing continued UN inspections.

The foreign ministers of Britain, Germany, France and Italy met in Brussels on Tuesday to decide how to respond to the crisis.

In the House of Commons, the defence secretary, Ben Wallace, told MPs that he did not consider the Iran nuclear deal, known as the Joint Comprehensive Plan of Action (JCPOA), as dead but said Europeans were having to consider whether to trigger the dispute resolution mechanism, a process that could lead to the snapback of European sanctions against Iran.

Heiko Maas, the German foreign minister, said Europe could not stand by and watch while Tehran announced its withdrawal from the nuclear deal.

In a potential goodwill gesture, the Iranian judiciary dropped spying charges against the French-Iranian dual national Fariba Adelkhah after an hour-long hearing. But she was kept in jail pending other charges.

The deputy foreign minister, Abbas Araghchi, also said Iran could remain in the deal “if the other party remains committed to its conditions”. Iran was “ready to come back to full compliance” with its nuclear deal with world powers, he said.

But Macron, in a statement after his phone call, demanded Iran abandon its plan to end its commitments to the JCPOA, and urged Iran not to take any retaliatory military action that might make the crisis worse . He also called for Adelkhah to be released from jail.

Rouhani told Macron that US interests in the region were “in danger”, his office said. “The United States must know its interests and security in the region are in danger and that it cannot escape the consequences of this great crime.”

Germany has about 120 soldiers in Iraq with a brief to train its security forces in the fight against Isis. Fewer than 30 are based in Taji military camp, a handful are in the headquarters in the Iraqi capital and fewer than 90 are in the relatively safe Kurdish area in northern Iraq.

Maas denied any suggestion that Germany may be on the brink of pulling out of Iraq but said it would accept any decision by the Iraqi government. “If training is to be resumed, these forces can be relocated,” he said.

Angela Merkel, the German chancellor, is due to meet President Vladimir Putin in Russia on Saturday to discuss the Iran crisis.