Boris Johnson has been criticised for comparing the struggle of Ukrainians fighting Russia's invasion to people in Britain voting for Brexit.
In a speech he said Britons, like Ukrainians, had the instinct "to choose freedom" and cited the 2016 vote to leave the EU as a "recent example".
Conservative peer Lord Barwell said the referendum wasn't "comparable with risking your life" in a war.
And Lib Dem leader Sir Ed Davey said it was an "insult" to Ukrainians.
Addressing the Conservative party's spring conference in Blackpool earlier, the prime minister said: "I know that it's the instinct of the people of this country, like the people of Ukraine, to choose freedom, every time.
"I can give you a couple of famous recent examples.
"When the British people voted for Brexit in such large, large numbers, I don't believe it was because they were remotely hostile to foreigners.
"It's because they wanted to be free to do things differently and for this country to be able to run itself."
Mr Johnson also cited as an example British people choosing to get vaccinated against coronavirus because they "wanted to get on with their lives" and "were fed up with being told what to do by people like me".
But his remarks, intended to rally the Tory faithful, attracted criticism from political figures in the UK and Europe.
Donald Tusk, ex-president of the European Council, said Mr Johnson's comments would "offend Ukrainians, the British and common sense".
Guy Verhofstadt, the former prime minister of Belgium who was the European Parliament's chief Brexit negotiator, said the comparison was "insane".
Lord Barwell, who served as Theresa May's chief of staff in No 10, said: "Apart from the bit where voting in a free and fair referendum isn't in any way comparable with risking your life to defend your country against invasion, and the awkward fact the Ukrainians are fighting for the freedom to join the EU, this comparison is bang on."
Ukraine applied for fast-track membership of the European Union last month, shortly after the Russian invasion.
Ukrainian President Volodymyr Zelensky said on Friday he had spoken to the head of the European Commission Ursula von der Leyen and expected progress to be made on its application in the coming months.
Meanwhile, the Liberal Democrat leader Sir Ed Davey called the prime minister a "national embarrassment", adding: "To compare a referendum to women and children fleeing Putin's bombs is an insult to every Ukrainian.
"He is no Churchill: he is Basil Fawlty."
The SNP's Westminster leader Ian Blackford branded the comparison "crass and distasteful" and said his comments showed how "dangerously observed" the Conservatives were with Brexit.