Boris Johnson has spoken to Iran’s president, Hassan Rouhani, to urge an end to further military retaliation in the region, amid efforts to try to de-escalate the crisis sparked by the US killing of the senior Iranian general Qassem Suleimani.

However, the continued gap between London and Tehran was highlighted in Iranian reports of the call, which said Rouhani stressed to Johnson the role played by Suleimani in fighting to defeat Islamic State in Syria and Iraq.

A Downing Street spokesman said Johnson held a phone call lasting 20 minutes with Rouhani on Thursday and reaffirmed UK support for the international deal with Iran over nuclear capabilities, formally known as the Joint Comprehensive Plan of Action, or JCPOA.

“They discussed the situation in the region following the death of Qassem Suleimani and the prime minister called for an end to hostilities,” he said.

“The prime minister underlined the UK commitment to the JCPOA and to ongoing dialogue to avoid nuclear proliferation and reduce tension. He raised the continued detention and mistreatment of Nazanin Zaghari-Ratcliffe and other dual nationals in Iran, and called for their immediate release.”

Johnson has sought to largely back Donald Trump over his decision to approve the killing of Suleimani in a drone-launched rocket attack as he left Baghdad airport, which Labour has warned does not appear justified under international law.

At prime minister’s questions in the Commons on Wednesday, Johnson argued that “most reasonable people” would think the US operation was justified, citing his involvement in fomenting instability in the region.

But according to the Iranian news agency ISNA, Rouhani told Johnson that the streets of London were safer because of Suleimani’s efforts to defeat Isis. “You would not be comfortable in London today but for Suleimani’s efforts,” he was reported as saying.

Underlining the gulf between Britain and Iran over Suleimani’s role, Rouhani told Johnson that he had worked with Suleimani for 40 years, and the picture portrayed of him in the west bore no relationship to reality.

He also said the Iranian attack on coalition bases in Iraq in response to the assassination of Suleimani was proportionate and legitimate under article 5 of the UN charter, the same basis on which the US justified its initial attack.

He also told Johnson that if the US repeated its attack, America would receive a very dangerous response, claiming the White House simply had no understanding of the region.

The head of the Revolutionary Guards aerospace force, Amir Ali Hajizadeh, said in a press conference on Thursday that the missile strikes were not designed to kill US troops but had instead targeted “America’s military machine”.

“We were not after killing anyone, although tens of US troops have likely been killed and wounded, and carried with C-130 planes to Baghdad, Israel and Jordan hospitals,” Hajizadeh said, according to the state-run Fars news agency.

“If we were looking to kill, we could have designed the operation in a way such that 500 [US personnel] would be killed in the first step, and if they had responded, a further 4,000 to 5,000 would be killed in the next steps within 48 hours.”

The UK ambassador to Iran, Rob Macaire, has been summoned this week by the Iranian foreign ministry to hear protests over the way in which UK cabinet members have said they do not lament the killing of Suleimani. Macaire was warned that the UK could be seen as an accomplice in the assassination if it continued to adopt this line.

Rouhani also told Johnson that Iran remained committed to cooperating with the International Atomic Energy Agency, the body that is responsible for overseeing compliance with the nuclear deal.

Trump is a vehement opponent of the deal, which aims to limit and control the country’s nuclear capabilities.

Speaking at the UN general assembly in September, Johnson appeared to side with the US president, saying he agreed with Trump that it was “a bad deal” and that a better one should be devised.

During a visit to Washington, the foreign secretary, Dominic Raab, said the JCPOA had “reached a point where non-compliance has been so acute in the most recent steps taken by Iran that obviously we’re going to be looking very hard at what should happen next”.

Asked whether Johnson was now rowing back from such positions, the prime minister’s spokesman said there was no contradiction: “Our position is that the JCPOA is the best arrangement currently available to deliver on our goal of stopping Iran from having a nuclear weapon.”

Another source of long-time tension between Iran and the UK has been the detention for more than three years in Tehran of Zaghari-Ratcliffe, the British-Iranian woman jailed on charges of spying, which she and her family deny.

When Johnson was foreign secretary he was accused of making her position worse by wrongly telling a parliamentary committee that Zaghari-Ratcliffe had been in Iran to teach journalism when she was arrested.

Asked what the PM had told Rouhani about the case, the spokesman said: “His message on that was very, very clear, that we want to see Nazanin and other dual-national cases resolved and for them to be released immediately.”

Additional reporting by Michael Safi in Amman