Sir Gavin Williamson blocked a £400 million deal to bring Nazanin Zaghari-Ratcliffe home from Iran five years before she was released on the basis the money could be used by Hezbollah, Boris Johnson has said.

The former prime minister claimed that, in 2017, he reached an agreement paving the way for the UK national’s release in return for money owed by Britain to Tehran since the 1970s.

The Treasury and the Foreign Office approved, but Number 10 insisted the decision needed to be signed off by all relevant departments, including the Ministry of Defence.

Sir Gavin, then defence secretary, refused to sanction the deal, suggesting some of the £400 million could end up in the hands of Hezbollah and be used to buy weapons and “kill our boys”, Mr Johnson alleged.

Boris Johnson said Sir Gavin Williamson had said he did not want money ending up in the hands of Hezbollah (Jonathan Brady/PA)

In his memoir – Unleashed – Mr Johnson described visiting Iran while he served as foreign secretary in Theresa May’s administration to plead Ms Zaghari-Ratcliffe’s case to Hassan Rouhani.

During talks in the president’s “mirror-walled palace”, he suggested the issue of a historical £400 million debt Britain owed the country for a consignment of tanks that was never delivered “might be resolved”.

In response, the president indicated that “perhaps the consular cases could be resolved”, Mr Johnson said, leading him to believe that “we had an agreement”.

The former prime minister also revealed that, before the deal had been sanctioned by other relevant departments, he saw Ms Zaghari-Ratcliffe’s family at the embassy and suggested that progress had been made.

“Without over-promising, I told them that we had begun the process – and I believed that we had,” he said.

When he returned, Sir Gavin refused to give his backing, saying “I won’t send money to Hezbollah so they can buy weapons to kill our boys”, Mr Johnson claimed.

Sir Gavin Williamson allegedly refused to back the deal (Jordan Pettitt/PA)

“I’m not sure which theatre of conflict he was talking about … It was no use. I have always been friendly with Gavin, who is a keen student of politics and power, and I could see what was really going on,” he wrote.

“While Nazanin languished in Iranian captivity, with many blaming me, there were quite a few people who were savouring my moral torment – not least, I suspect, in Number 10.”

Sir Gavin has been contacted for comment.

Ms Zaghari-Ratcliffe was freed in March 2022, during Mr Johnson’s premiership, after the UK agreed to settle its debt with Tehran.

Mr Johnson has been accused of lengthening her ordeal himself when, as foreign secretary, he wrongly claimed she had been training journalists at the time of her arrest in 2016.

The British-Iranian dual national challenged the then-prime minister over the “massive impact” of his comments when they came face to face in a Downing Street meeting after she was brought home.