David Cameron | Frank Augstein/AFP via Getty Images David Cameron: Putin and ISIL would be happy with Brexit Boris Johnson says prime minister’s comments are ‘a bit much, really.’

Russian President Vladimir Putin and the leader of Islamic State would be in favor of Britain leaving the EU, Prime Minister David Cameron said Tuesday.

“Who would be happy if we left?” Cameron asked the audience during a World Economic Forum event in London. “Putin might be happy. I suspect [ISIL leader Abu Bakr] al-Baghdadi might be happy.”

Cameron was defending himself against criticism of a speech last week in which he argued that British influence in the EU had helped ease tensions between countries that had been "at each others' throats for decades," and that he would "never be so rash as to make [the] assumption" that peace and security in Europe can be assured.

“I never said if we leave on Thursday, World War III breaks out on Friday,” Cameron said at the event.

Cameron's comments were rubbished by former London Mayor Boris Johnson, who is campaigning for Brexit.

"One might argue it's a bit much to start comparing people arguing for freedom in this country or the restoration of democracy in this country to say our allies are Putin and [ISIL],” Johnson told reporters, according to the Telegraph. "I think that's a bit much, really."

UKIP leader Nigel Farage said leaving the EU would be the U.K.'s best chance of keeping ISIL extremists out of the country.

Russian chess grandmaster and political activist Garry Kasparov argued in an opinion piece Friday that Putin is actively seeking Brexit, through Russian media outlets, as a means to further his strategy to divide and conquer Europe.