The promise came after Finland jettisoned decades of military non-alignment for a bulwark against Russia, redrawing the balance of power in Europe and angering the Kremlin.
On the ground in Ukraine, Russia announced air strikes in the east, as well as in Lviv, near the Polish border in the west which has largely been spared the destruction of elsewhere.
At a meeting of alliance 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.
Stoltenberg said the alliance would look to provide both with interim security guarantees while the applications are processed, including possibly by increasing troops in the region.
In Berlin, US Secretary of State Antony Blinken said he heard "almost across-the-board, very strong support" for the bids, despite misgivings from Turkey.
Ankara has accused both Sweden and Finland of harbouring Kurdish extremists but Stoltenberg said it was not blocking their membership and was confident of finding common ground.
The Kremlin insists the Nordic nations have nothing to fear, in apparent retaliation, has pulled the plug on electricity supplies to Finland, with which it shares a 1,300-kilometre (800-mile) border.
Earlier, Western intelligence claimed that Russia has suffered huge military losses in Ukraine and that it will get bogged down in the strategic east because of stiff local resistance.
Away from the conflict, Ukraine was basking in the morale-boosting glory of the landside win of its entry to the Eurovision Song Contest, the world's biggest live music event.
On the battlefield, Russia's defence ministry claimed it had carried out "high-precision" missile strikes on four artillery munitions depots in the Donetsk area in the east of Ukraine.
Airstrikes had also destroyed two missile-launching systems and radar, while 15 Ukrainian drones were taken out around Donetsk and Lugansk, it added.
In Lviv, the regional governor, Maksym Kozytsky, said four Russian missiles hit military infrastructure near the border with Poland.
No casualties were reported and Ukrainian armed forces said they destroyed two cruise missiles over the region.
Lviv was last hit by Russian missiles on May 3.
UK defence chiefs said Russia's offensive in the eastern Donbas region had "lost momentum".
Demoralised Russian troops had failed to make substantial gains and Moscow's battle plan was "significantly behind schedule", UK Defence Intelligence said.
"Russia has now likely suffered losses of one third of the ground combat force it committed in February.
"Under the current conditions, Russia is unlikely to dramatically accelerate its rate of advance over the next 30 days."
Exact, reliable casualty figures have been hard to come by, with Ukraine and Russia regularly publishing claims of enemy dead.
Kyiv says its troops have killed nearly 20,000 Russian troops. Moscow on March 25 said its forces had killed at least 14,000 Ukrainian military personnel.
But both figures are widely suspected to be inflated, and have not been verified by AFP or independent conflict monitors.
The Kremlin said in late March that some 1,351 of its troops had been killed.
A senior NATO military official estimated at the same time that between 7,000 and 15,000 Russian soldiers could have been killed in the fighting up to that point.
Russia has increasingly turned its attentions to eastern Ukraine after failing to capture Kyiv.
Western leaders have predicted a drawn-out war of attrition stretching into next year.
But Ukrainian commanders have been more upbeat and expect a turning point by August.
Russia has been trying to cross a river and encircle the city of Severodonetsk but have been repelled, with heavy losses of equipment, according to the governor of the Lugansk.
Local officials in Ukraine's second city of Kharkiv in the north have said Russian troops were withdrawing from the surrounding region, and Ukrainian forces were counter-attacking.
Ukrainian troops have been fighting a rear-guard battle from a network of underground tunnels and bunkers in the bowels of a steelworks in the devastated southern port city of Mariupol.
Families of the estimated 600 troops still holed up at the vast Azovstal plant have appealed to China to intervene to secure the release of the dead and wounded.
The United Nations and Red Cross helped to evacuate women, children and the elderly from the plant whey there were sheltering earlier this month.
Petro Andryushchenko, an adviser to the mayor of the city, said on Telegram that a "huge convoy" of 500 to 1,000 cars had arrived in the city of Zaporizhzhia.
In war-weary Kyiv, news of Ukraine's runaway Eurovision success was met with outpourings of joy and relief, bringing some respite from a daily barrage of grim reports of the conflict.
"It's a small ray of happiness. It's very important now for us," said Iryna Vorobey, a 35-year-old businesswoman, adding that the show of support from across Europe was "incredible".
"I'm very glad," said Andriy Nemkovych, a 28-year-old project manager. "This win is so very good for our mood."
The Kalush Orchestra's "Stefania", a rap lullaby combining folk and modern hip-hop rhythms, won the popular vote of viewers, pushing the UK into second place.
President Volodymyr Zelensky praised the group, whose lyrics about home took on extra poignancy with six million Ukrainians currently displaced outside the country.
But some were lukewarm.
"Now, it's not the most important thing," said Vadym Zaplatnikov, 61, who insisted that "having Crimea back" would be a much more welcome announcement.