Boris Johnson has apologised for referring to black people as "piccaninnies" and talking about "watermelon smiles".

During a debate for the London mayoral contest on Monday, the Conservative candidate said he was "sad" that people had been offended but insisted the words had been taken out of context.

In a column published in the Daily Telegraph six years ago, Johnson mocked Tony Blair's globetrotting: "What a relief it must be for Blair to get out of England. It is said that the Queen has come to love the Commonwealth, partly because it supplies her with regular cheering crowds of flag-waving piccaninnies," he wrote. It also mentioned "watermelon smiles".

At the debate, sponsored by the Evening Standard, Michael Eboda, former editor of New Nation, said that some of Johnson's writings had been offensive. "These things are an extremely big obstacle to being able to work with what is 12% of London's population," he said. Johnson responded: "I feel sad that people have been offended by those words and I apologise for them."

Lord Ouseley - the former chair of the Commission for Racial Equality, who recently wrote to the Tory leader, David Cameron, expressing concern about Johnson, said: "I personally recognise that you have to move on, but there are other people who he will have to convince."