Secretary-General Jens Stoltenberg said western leaders must continue to arm Ukraine against Russian aggression “even if the costs are high”.
“We must prepare for the fact that it could take years. We must not let up in supporting Ukraine,” Mr Stoltenberg told German newspaper Bild am Sonntag.
“Even if the costs are high, not only for military support, also because of rising energy and food prices.”
His comments come ahead of a NATO summit in Madrid later this month, where officials are expected to agree to an assistance package for Ukraine that will help the country move from Soviet-era weaponry to NATO-standard gear.
Russia refocused its offensive on the eastern Donbas region earlier this year after Ukrainian forces successfully repelled Vladimir Putin’s troops from central and northern regions, including Kyiv.
However, Ukrainian officials have warned that their military is sustaining heavy losses in the region and have urged western officials to expedite the delivery of key weaponry.
Mr Stoltenberg said that arming Ukraine with modern weaponry was key to liberating the Donbas region from Russia’s control.
In an article for the Sunday Times, he said the west must ensure Ukraine has “the strategic endurance to survive and eventually prevail”.
“I’m afraid we need to steel ourselves for a long war,” he wrote.
“Time is the vital factor. Everything will depend on whether Ukraine can strengthen its ability to defend its soil faster than Russia can renew its capacity to attack.”
Mr Johnson said that allowing Mr Putin to control the Donbas would be a “travesty” and mark “the greatest victory for aggression in Europe since the Second World War.”
He claimed that any peace deal that required Kyiv to cede territory to Moscow would have serious ramifications for the rest of Europe, despite the economic harm caused by a drawn-out conflict.
Ukraine’s defence minister Oleksiy Resnikov met with some 50 countries in the Ukraine Defence Contact Group in Brussels on Wednesday to request further supplies of arms and ammunition.
Meanwhile, Ukrainian president Volodymyr Zelensky visited troops in the southern Mykolayiv region on Sunday, about 550km south of Kyiv.
“Their mood is assured: they all do not doubt our victory,” he said in a video that appeared to have been recorded on a moving train.
“We will not give the south to anyone, and all that is ours we will take back.”
Mr Zelensky said he had been informed of multiple Russian strikes on civilian areas in the Mykolayiv and Odesa regions.
“The losses are significant. Many houses have been destroyed; civilian logistics have been disrupted,” he said.
Russian shelling of the besieged city of Sievierodonetsk continued over the weekend, though Ukraine’s military denied that Mr Putin’s forces had seized control of the region.
The city, which lies in the Luhansk region, has become a top target for Moscow in its offensive in the Donbas and seen some of the most intense fighting of the conflict so far.
“All Russian claims that they control the town are a lie. They control the main part of the town, but not the whole town,” Luhansk Governor Serhiy Gaidai told Ukrainian television.
In Sievierodonetsk’s twin city of Lysychansk, residential buildings and private houses had been destroyed, Mr Gaidai said.
“People are dying on the streets and in bomb shelters,” he added.