Michael Gove has told Conservative MPs that he would be willing to delay Brexit “for a few months” if it would guarantee that the UK left the EU with a deal.

Speaking at a Tory leadership hustings in parliament, the environment secretary said he would seek an extension to the 31 October deadline if the prospect of an exit deal was in sight.

Allies of the cabinet minister said the delay could be up to “a few months” if a deal was nearly completed, but that Mr Gove would also be willing to opt for a no-deal outcome if the EU refused to reopen the current withdrawal agreement.

In a clear dig at other candidates who have ruled out a further delay, including Boris Johnson and Dominic Raab, they said it was “foolish” to commit to the deadline in case more time is needed for negotiations.

Speaking after the hustings, George Eustice, the former farming minister who is backing Mr Gove, said: “The point he made about why he’s unwilling to rule out under any circumstances a move beyond October isn’t that he’s planning to extend it for 12 months, it’s that if you’ve got to a position where you’ve nearly got a deal there, you’re 95 per cent of the way there, you just need a few more weeks or even a few more months to clear it up, it would be foolish to flounce off because you’ve committed to leave come what may at the end of October.”

He said Mr Gove would use the time to try to find an alternative to the controversial Northern Ireland backstop.

Mr Gove later told an event organised by The Spectator: “The critical thing to do is to say if we are not 100 per cent out by midnight on October 31, then we risk making that an arbitrary deadline of what a good deal is.

“If we are so close to the wire with what I believe is a better deal, then it would be right to take an extra few days or weeks to ensure that we land it.”

Speaking after Mr Gove at the hustings, which was organised by the One Nation group of Tory MPs, Matt Hancock, the health secretary, caused a stir by calling Jeremy Corbyn “an antisemite”.

On the 75th anniversary of D-Day, Mr Hancock told Tory MPs they must deliver Brexit or else “end up with the first antisemitic leader of a western nation since the Second World War”.

Senior Tories have often criticised Mr Corbyn over his handling of antisemitism but Mr Hancock’s comments are the first time that a sitting cabinet minister has directly accused the Labour leader of being antisemitic.

In response, a Labour spokesperson said: “This baseless political attack rings hollow from a minister in a party that has supported governments that actively promote antisemitic policies in Hungary and Poland, and has spent the week wooing Trump – the man who refused to condemn neo-fascists in Charlottesville who chanted ‘Jews will not replace us’.

“Numerous candidates in the Conservative leadership contest have been accused of racism, Islamophobia, homophobia and misogyny, one of whom may be the next prime minister.”

Jeremy Hunt, the foreign secretary, sought to dispel comparisons between himself and Theresa May, insisting: “I am not Theresa in trousers.”

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

He said the next prime minister would need to build “unity” and warned that a tough approach in favour of a no-deal Brexit “will lead to a hardline response” from EU leaders. The comment risks further angering Eurosceptic Tories, who were unhappy last week when Mr Hunt said a no-deal outcome would be “political suicide”.

The foreign secretary told the hustings: “Our mission has to be unity. We need to bring together the country, not just get through Brexit, bringing together the 52 per cent and the 48 per cent. As well as being compassionate conservatives, we need to be radical conservatives.

“At the moment we only have bad choices. We risk parliament blocking no deal and the EU blocking a better deal, so we need a leader who can negotiate a new approach. I’m an entrepreneur who has been doing deals all my life.

“I negotiated the new BBC licence fee and the new doctors contract. I won’t pretend this will be easy. I met [French president Emmanuel] Macron and [German chancellor Angela] Merkel today in Portsmouth and a hardline approach will lead to a hardline response. They will wait for parliament to block no deal.”

Support free-thinking journalism and attend Independent events

Dominic Raab, the former Brexit secretary, said he would deliver Brexit by 31 October with or without a deal, and said he had “seen the EU upfront and personal” and “looked our EU opposite numbers in the eyes”.

He said: “I know the strengths but also the weaknesses of their positions. That’s why we don’t just need a conviction Brexiteer. We need someone who is resolute, but someone who can navigate the rocky path ahead and get Brexit delivered. I’m the candidate you can trust, who will give us the best shot of getting a better deal for the UK.”

He refused to rule out working with Nigel Farage or proroguing parliament to stop MPs blocking a no-deal Brexit – a suggestion that one MP in the room said had been met with “deafening silence”.