Last week Mr Johnson refused to apologise for the blunder saying only he was sorry if his words had been “taken out of context or misconstrued”.

But today he told MPs: “I do apologise and of course I retract any suggestion that she was there in a professional capacity."

He was condemned just minutes earlier by Shadow Foreign Secretary Emily Thornberry when he appeared to fudge the apology.

Mr Johnson had said: “I apologise to Mrs Zaghari-Ratcliffe and to her family if I had inadvertently caused them any further anguish.”

But Ms Thornberry said: “Will the Foreign Secretary today accept the impact that his words have had accept the distress that has been caused to Nazanin and apologise properly for that?

“Not apologise for upsetting people but apologise for getting it wrong.”

She added: “If it is a matter of pride that the Foreign Secretary is refusing to admit simply that he has made a mistake well then I feel bound to say to him his pride matters not one ounce compared to Nazanin’s freedom.”

Later during the Urgent Question debate Mr Johnson added: “That was my mistake. I should have been clearer and I apologise for the distress and anguish that has been caused to Mrs Zaghari-Ratcliffe and her family.”