Boris Johnson is the frontrunner to be Britain's prime minister. (File)

Boris Johnson, the frontrunner to be Britain's prime minister, repeated his pledge on Tuesday that he would take the United Kingdom out of the European Union by October 31, saying otherwise the government would face a catastrophic loss in trust.

"We must come out on the 31 October because, otherwise I am afraid we face a catastrophic loss in politics," Johnson said in a televised debate with the other four remaining candidates seeking to be Britain's next leader.

"Unless we do it, unless we get out on October 31 I think we will all start to pay a really serious price."