The promise came after Finland jettisoned decades of military non-alignment, redrawing the balance of power in Europe and angering the Kremlin.
On the ground in Ukraine, Russia announced air strikes in the east and in Lviv in the west as Western intelligence predicted its campaign in eastern Ukraine would stall amid heavy losses and fierce resistance.
At a meeting of NATO foreign ministers in Berlin, Germany's Annalena Baerbock said it would provide military assistance "for as long as Ukraine needs this support for the self-defence of its country".
"Ukraine can win this war. Ukrainians are bravely defending their homeland," NATO chief Jens Stoltenberg added.
Sweden's ruling party said it was in favour of joining NATO just hours after Finland's announcement, in a remarkable turnaround in political and public opinion following Russia's invasion of Ukraine.