Britain’s Prime Minister Boris Johnson has warned allies to prepare for a long war in Ukraine, urging sustained support for Kyiv or risk “the greatest victory for aggression” since World War II.

In an article for The Sunday Times, Johnson said Ukraine’s foreign backers should hold their nerve to ensure it has “the strategic endurance to survive and eventually prevail.”

Johnson made a surprise visit to Kyiv on Friday, a day after European leaders from France, Germany, Italy and Romania were in the Ukrainian capital to back the country’s EU ambitions.

The British premier offered President Volodymyr Zelenskyy a ramped up military training program to help in its fight against Russian forces.

“Time is now the vital factor,” Johnson wrote in a 1,000-word article posted online Saturday night.

“Everything will depend on whether Ukraine can strengthen its ability to defend its soil faster than Russia can renew its capacity to attack. Our task is to enlist time on Ukraine’s side.”

To help, he outlined a four-point plan for “constant funding and technical help,” levels of which should be maintained for “years to come” and potentially be increased.

Johnson has previously warned of a drawn-out conflict lasting until the end of next year. Ukrainian officials have repeatedly called on NATO allies for more weapons and equipment.

Russian troops failed to take Kyiv after invading Feb. 24, and fighting has switched to the south and east.

Western nations have slapped wide-ranging restrictions on pro-Kremlin Russian businesses and individuals but there is concern the conflict is exacerbating global economic difficulties.

Johnson, himself battling inflation at 40-year highs at home and spiraling domestic fuel prices, however told allies that economic concerns should not lead to a rushed settlement in Ukraine.

Allowing President Vladimir Putin to keep territory in Ukraine would not lead to a more peaceful world, he said.

“Such a travesty would be the greatest victory for aggression in Europe since the Second World War,” he added.