Two Conservative leadership candidates have said they are ready to take the UK out of the EU without a deal, if the only alternative is halting Brexit.

But neither Sajid Javid nor Jeremy Hunt gave an absolute pledge to quit the EU by the deadline of October 31 this year, though the home secretary said he would do everything in his power to do so

Speaking to Sky News’ Sophy Ridge on Sunday, Mr Javid said: “The policy of any government I lead will be to leave on 31 October. We will do everything in our power to leave on 31 October.

“I will do everything I can to get a deal, but if I have to choose between no deal and no Brexit, I will choose no deal.”

And foreign secretary Mr Hunt told the same programme: “I have always said that if the only way to leave the EU is without a deal, I would do that, because we have to honour that referendum result.

“But I would do so with a heavy heart because of the potential risks to business and to the Union, and I wouldn’t do it if there was a prospect of a good deal.”

Who is standing to be the next prime minister? Show all 3 1 /3 Who is standing to be the next prime minister? Who is standing to be the next prime minister? Boris Johnson - 157 votes Foreign Secretary Boris Johnson arriving in Downing Street, London, for a Cabinet meeting where Theresa May will brief on her plans for Brexit before a major speech aimed at helping to break the deadlock in the negotiations with Brussels. PA Who is standing to be the next prime minister? Michael Gove - 61 votes LONDON, ENGLAND - JUNE 07: Britain's Environment Secretary Michael Gove leaves 10 Downing Street on June 7, 2018 in London, England. Prime Minister Theresa May is holding an emergency Brexit cabinet meeting in an attempt to resolve tensions over the UK's Irish border plan. (Photo by Simon Dawson/Getty Images) Getty Who is standing to be the next prime minister? Jeremy Hunt - 59 votes Health and Social Care Secretary Jeremy Hunt leaving Downing Street, London, after attending a Cabinet meeting. PA

Mr Hunt said it was “unwise” for any candidate to pledge to leave by 31 October regardless of whether a deal has been secured - as frontrunner Boris Johnson has done - as this might require calling a general election which would be “catastrophic” for the Tories.

“If you say 31 October is a deadline, come what may, and parliament blocks no deal, the only way to deliver on that promise is to have an election and change parliament, and that would be catastrophic for the Conservative Party,” he said.

He warned Tories against choosing a leader who would take an “ultra-hardline” approach to Brexit, as the EU would take an ultra-hardline stance in response.

Asked for his view of Mr Johnson’s record as foreign secretary, Mr Hunt replied: “He was quite a Marmite character, of course, and there are European foreign ministers who found him difficult to deal with because of his views on Brexit.”He said he had been encouraged in private talks with German Chancellor Angela Merkel at last week’s D-Day commemorations by indications that she was ready to see the UK take a new approach to the Irish border issue.

“When talking to other European governments, what I hear the whole time is they want to do a deal with us if we approach it the right way,” he said.

And he insisted the UK could make a success of Brexit: “We have been through far, far worse in our history and we can get through this and we can make a terrific success of it, and I think we will.”

Environment secretary Michael Gove said that he would be willing to extend Brexit talks for “weeks or days” beyond 31 October if a withdrawal deal was within grasp.

But asked on BBC1’s Andrew Marr Show if the UK could remain in the EU until early 2020 if he became prime minister, he replied: “No.”

Mr Gove said he would ensure Brexit happened “at the earliest possible opportunity”.

But he said: “I wouldn’t delay until the end of next year, but there is a clear choice. If we are on the cusp of a good deal and we are 95 per cent of the way there on 31 October, would it really make sense to junk that progress and say we are leaving without a deal.”

He said it was an “irresponsible risk” for any leadership contender to make it an absolute commitment to leave by the end of October, deal or no deal, as this was likely to precipitatie a no-confidence vote in the Commons and a general election which would be won by Jeremy Corbyn.

Mr Javid is promising to spend “hundreds of millions of pounds” on a technological solution to the problem of the Irish border in order to be able to quit Europe with a deal based on Theresa May’s withdrawal agreement.

Despite widespread doubts that the technology exists to police millions of movement across hundreds of border crossings between Northern Ireland and the Republic, Mr Javid insisted that a system could be introduced “within a couple of years” if both sides were willing to work together.

He said that a successful withdrawal agreement would create a “mini economic boom in this country” which would pay for the equipment required.

Home secretary Sajid Javid says UK should pay Ireland hundreds of millions of pounds to solve Brexit border deadlock (Reuters)

Mr Javid, who has won the endorsement of the Tory leader in Scotland Ruth Davidson for his leadership bid, is planning to slow down the rate at which the UK pays down its deficit if he becomes PM.

He said this could free up £15-£25 billion a year to spend on priorities like schools, local government and crime.

Mr Javid said be believed Britain was ready for a Muslim prime minister, and said it would be an advantage to the Conservatives to select a new leader who was seen as an “outsider”, not only because of his racial background but also his working-class upbringing.

He said he was “privileged” to be the first member of an ethnic minority to serve in one of the “great offices of state”.

Asked if his party was ready for a Muslim PM, he said: “I think the country – not just the Conservative Party – is ready for leaders in politics from all sorts of backgrounds.

Support free-thinking journalism and attend Independent events

“When I compare Britain to so many other countries, there is no doubt in my mind that we are the most successful multi-racial democracy in the world.”

Mr Javid said he had experienced racism as a child and young man, but not since entering Parliament.

“As a child, sadly, many times – these are things you don’t forget, being called ‘Paki’, being attacked by National Front skinheads, and punching back a few times,” he said.

He added: “Sometimes, I do think of myself as a bit of an outsider, not just because of race but my working-class background and the schools I went to.