Boris Johnson was challenged over his comparison of veiled Muslim women to “letterboxes” during the televised Conservative leadership debate but failed to answer the question directly.

The candidate answered BBC host Emily Maitlis’ question about the past comments by saying: “In so far as my words have given offence over the last 20 or 30 years when I have been a journalist and people have taken those words out of my articles and escalated them, of course I am sorry for the offence they have caused.”

In response to a question on Islamophobia, Mr Johnson said: “When my Muslim great-grandfather came to this country in fear of his life in 1912, he did so because he knew it was a place that was a beacon of hope and of generosity and openness, and a willingness to welcome people from around the world.”

And asked about his handling of the Nazanin Zaghari-Ratcliffe case during his time as foreign secretary, Mr Johnson denied that his erroneous suggestion she had been involved in training journalists had contributed to an increased sentence in an Iranian jail.

“In that case, it didn’t, I think, make any difference,” he said. “If you point the finger at the UK, all you are doing is exculpating those who are truly responsible, which is the Iranian Revolutionary Guard.”

Five big moments from the BBC leadership debate Show all 5 1 /5 Five big moments from the BBC leadership debate Five big moments from the BBC leadership debate Johnson doesn't "want no deal" Responding to a question from a member of the public who fears a no-deal Brexit, Johnson repeatedly stated that "no one wants no deal" Jeff Overs/BBC via Getty Five big moments from the BBC leadership debate Candidates all agree on Tory Islamophobia inquiry After a member of the public raised the issue of Islamophobia, Sajid Javid committed to an external inquiry into Islamophobia in the Conservative Party. He then turned to his fellow candidates to see if they agreed and they all did. BBC Five big moments from the BBC leadership debate Hunt say cuts to social care "did go to care" In a surprising moment, Jeremy Hunt apologised for the extent of cuts that he oversaw in his time as health secretary. He added that local authorities need more money and that mental health care needs to improve BBC Five big moments from the BBC leadership debate Stewart alone on taxes Rory Stewart stated that he would not offer tax cuts like the other candidates as "our country is suffering huge pressure on our public services" and can not afford. He pointed out that the other candidates were offering up to £85 billion in tax cuts BBC Five big moments from the BBC leadership debate Johnson claims Zaghari-Ratcliffe comments had no consequence Following a question from a member of the public about the consequence of words, Johnson was pressed on his false claim that British-Iranian prisoner in Iran Zaghari-Ratcliffe was "teaching journalism". Johnson claimed that his words "did not make any difference" but it is widely considered that his comment led to an increased prison sentence for Zaghari-Ratcliffe. EPA

Sajid Javid asked the other candidates if they would support an independent inquiry into Islamophobia in the Conservative Party, and all four said they would support its set up. “It’s great that we all agree on that,” said Mr Javid.

Jeremy Hunt denied that he endorsed Donald Trump’s retweeting of the “racist rants of Katie Hopkins”.