Boris Johnson and other G7 leaders condemned Russia’s actions in Ukraine as the summit in Germany drew to a close.
The prime minister said he did not think the war would lead to wider conflict in Europe, but warned that this was exactly what Vladimir Putin wanted.
A gathering of world leaders in Bavaria was overshadowed by atrocities in Ukraine, including a rocket attack on a crowded shopping mall in Kremenchuk on Monday.
Mr. Johnson called it an act of “complete barbarism.”
“People are just shocked by what Putin is capable of,” he said.
“If anything, it has helped those of us who are in favor of helping protect Ukrainians get the message across to some of those people who have more voices in the dispute.”
The head of the British army, General Sir Patrick Sanders, warned that NATO members must be ready for battle if Russia attacks their territory.
But speaking in Germany on the last day of the G7 summit, Mr Johnson said: “I don’t think it will come to that. It is clear that we are working very hard to limit this to Ukraine.
“Putin and the Kremlin will try to expand the conflict and say that this is what needs to be done between NATO and Russia – this is not at all the case.
“We are talking about an invasion of an independent sovereign country. It’s about the West and Ukraine’s friends giving them the support they need to defend themselves.”
A joint statement issued by the G7 at the conclusion of the Bavarian Alps summit promised the continuation of tough sanctions but abandoned the price cap on Russian oil exports that Joe Biden’s White House had been pushing for.
Instead, the leaders agreed only to study the measure.
G7 leaders condemned Russia’s “illegal and unjustified war of aggression against Ukraine.”
The statement said: “We will support Ukraine for as long as necessary, providing the necessary financial, humanitarian, military and diplomatic support in its courageous defense of its sovereignty and territorial integrity.
“We stand ready, together with interested countries and institutions and Ukraine, to agree on sustainable security commitments to help Ukraine defend itself and secure its free and democratic future.”
The leaders of the UK, US, Canada, Japan, Germany, France and Italy pledged to “continue to impose serious and ongoing costs on Russia to help end this war.”
“In addition to its direct consequences, Russian aggression hinders global recovery and dramatically worsens energy security and access to food around the world.
“To this end, we remain unwavering in our commitment to our unprecedented coordination on sanctions for as long as necessary, acting in unison at every stage, and will cut Russia’s income, including from gold.”
They added: “We will take immediate action to secure power supplies and reduce price spikes caused by extraordinary market conditions, including by exploring additional measures such as price caps.
“We reaffirm our commitment to phasing out Russian energy without compromising our climate and environmental goals.”
A UK government spokesman said: “Our own bans on Russian oil imports have not changed – they are about limiting the profits that Russia can make from selling its oil to other countries, while minimizing the negative economic consequences, especially for low- and middle-income countries.
“The restriction will work if you take advantage of the G7’s dominant maritime services, which allow you to transport Russian offshore crude oil and oil products around the world.
“Any company or country attempting to export Russian oil in excess of the limit will not be able to access these critical services and will be severely restricted.
“The G7 will carefully review the design of the cap in the coming weeks, in consultation with other countries and key private sector stakeholders.”