Boris Johnson mistakenly thanked Russia’s Vladimir Putin for his “inspirational leadership” instead of Ukrainian President Volodymyr Zelenskyy.
The shot came during his first major contribution as a backbench MP since being ousted as Prime Minister.
In a general joint debate on the war in Ukraine, Mr Johnson said it was important to “double down on our defense of the Ukrainians” if Mr Putin redoubled his “aggression”.
While listing the reasons why Ukraine’s counter-offensive is proving successful, he inadvertently thanked Mr Putin before quickly correcting himself and thanking Mr Zelenskyy.
He said: “Thanks to the heroism of the Ukrainian Armed Forces, thanks in part to the weapons that we are proud to offer, I congratulate my right friend (James Heappey) on his description of the work of the British Armed Forces, the weapons that we send , the huge list…
“Thanks, of course, to the inspirational leadership of Vladimir Putin.”
Johnson immediately realized his mistake and added: “The inspirational leadership of Volodymyr Zelenskyy, forgive me, the Russian forces have been driven out of large parts of the north-east of the country around Kharkiv in recent days.
“And they are under increasing pressure in Kherson in the south, and I have no doubt at all that the Ukrainians will win.”
It was the second time the MP for Uxbridge and South Ruislip made a backbench contribution in the Commons.
In his first appearance since stepping down as Prime Minister, Mr Johnson paid tribute to the late Queen Elizabeth at the special two-day event in Parliament.
During his speech on Ukraine, Mr Johnson also said Britain must be prepared to provide “more military assistance” and “more economic support” to Kiev.
He said: “If Putin wants to redouble his aggression, then we must redouble our defense of the Ukrainians and we must be prepared to provide more military assistance and more economic support, and I warmly welcome the announcements from this government this week .”
Johnson also warned against encouraging Ukrainians to strike a deal to “trade land for peace” to allow Russian gas to flow to Europe.
Supporting Ukraine was a key policy during Mr Johnson’s premiership.
He was a close ally of Mr Zelenskyy and visited the war-torn country three times in the seven months since it was invaded.
His last visit came at the end of August, when he said high energy bills are something British households have to endure as part of efforts to resist Putin.
Shortly before leaving office, Mr Zelenskyy wrote a piece for the Mail on Sunday in which he heaped praise on the former prime minister, describing him as a “true friend” and “ally”.