Boris Johnson has compared the struggle of Ukrainians fighting the Russian invasion to British people voting for Brexit.
In his speech to the Tory spring conference in Blackpool, Mr Johnson said it is the "instinct of the people of this country, like the people of Ukraine, to choose freedom", with the Brexit vote a "famous recent example".
The comparison was criticised by Tory peer Lord Barwell, who pointed out Ukraine is seeking to join the European Union.
In his speech, Mr Johnson 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."
Watch: Best chance to end Ukraine war is for Russia to realise 'enormous mistake', says former UK commander.
The other example given by the Prime Minister was the British people's willingness to voluntarily get vaccinated against COVID-19 because they "wanted to get on with their lives" and "were fed up with being told what to do by people like me".
Lord Barwell, who served as Theresa May's chief of staff in Number 10, said voting in the 2016 referendum "isn't in any way comparable with risking your life" in a war.
Writing on Twitter, he 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 + the awkward fact the Ukrainians are fighting for the freedom to join the EU, this comparison is bang on."
The Prime Minister also called Russia's war in Ukraine a "turning point for the world", adding it is a "moment of choice" between "freedom and oppression".