NATO Secretary-General Jens Stoltenberg says his organisation is "prepared for all eventualities" should Russia retaliate against Finland and Sweden for joining NATO.
At an historic NATO summit in Madrid, Sweden and Finland were invited to join the security alliance after Turkey dropped its opposition to admitting the two countries.
After the decision was made, Russian President Vladimir Putin sent one of his trademark veiled threats to NATO, Sweden and Finland.
"They should clearly understand that they didn't face any threats before this," he said.
"If NATO troops and infrastructure are deployed, we will be compelled to respond in kind and create the same threats for the territories from which threats towards us are created."
Mr Stoltenberg told a media conference on the final day of the Madrid summit that the two countries were sovereign nations that had made their own choices to join the alliance.
"The most important thing for us is that Finland and Sweden will become members of the alliance," he said.
The world has changed: Biden
At his final address to the summit, US President Joe Biden said the world had changed in the 12 years since NATO last drafted a mission statement — back then, Russia was characterised as a "strategic partner" to the alliance.
"NATO's changing as well," he said.
"At this summit, we rallied our alliances to meet both the direct threats Russia poses to Europe and the systemic challenges that China poses to a rules-based world order.
"Before the war started I told Putin that if he invaded Ukraine, NATO would not only get stronger but would get more united, and we would see democracies in the world stand up and oppose his aggression and defend the rules-based order.
"And that's exactly what we're seeing today."
German Chancellor Olaf Scholz used his platform to take aim at Mr Putin's claim that NATO was acting like it had "imperial ambitions".
"This is honestly quite ridiculous," Mr Scholz said.
"Because, in fact, NATO is a defensive alliance.
NATO to ramp up investment in military infrastructure
NATO allies have agreed to increase the alliance's common funding budget, where members contribute funds to run the organisation, its commands and its military infrastructure.
When asked by journalists about this commitment, Mr Stoltenberg was guarded about the numbers but said it was a "significant" increase.
"We are following up on the decision we made in principle last year," he said.
As part of this summit, NATO has committed to increase troop numbers and infrastructure in what it calls its "eastern flank" — in other words, member countries close to Russia.
Mr Stoltenberg reiterated that this was part of NATO's mission to prevent the war from escalating beyond the borders of Ukraine.
"That's NATO's core responsibility to make sure that there is no misunderstanding in the minds of any adversary, that if they do anything like what Russia has done to Georgia in 2008, or Ukraine now, that will trigger the full response from the whole alliance."
In a further escalation of rhetoric, Russia's deputy Security Council chairman Dmitry Medvedev said sanctions against his country could justify war.
"And even as a casus belli [justification for war]."
Icelandic PM praises summit
Iceland is one of the founding members of NATO and Prime Minister Katrín Jakobsdóttir has a unique perspective on what this summit achieved.
She has been her country's leader since 2017.
Her left-green party rejects all forms of militarisation and opposes Iceland's membership of the security alliance but, as the leader of a coalition government, she respects the Icelandic people's support of NATO.
She told the ABC that the Madrid summit had been a success.
"I think it's been a very important summit because we have actually been taking many big decisions," she said.
"The strengthening of NATO on the eastern flank, the strategic concept, which is obviously this long-term vision, which is a very important decision to make. And then thirdly, the accession of Finland and Sweden."
Ms Jakobsdóttir said the decisions of Sweden and Finland to join NATO, after years of priding themselves on their neutrality, would further strengthen the alliance.
"But also for us in the Nordic region, it means that we will have stronger Nordic unity within the alliance."
Finland and Sweden are set to sign the accession protocols on Tuesday that will allow them to join.