Vladimir Putin’s intentions were crystal clear when he invaded Ukraine. He wanted to subdue his neighbor, assert Russian authority in Eastern Europe, and make the West reconsider militarily and politically expanding toward Russia’s borders.

However, Putin’s plan appears to have failed in one crucial respect: the war has united the West against Moscow in ways that were unthinkable in January.

Finland and Sweden, both officially non-aligned countries, are now moving closer to joining NATO, the US-led military alliance.

Sanna Marin, the Finnish prime minister, said her country’s decision on whether to apply for membership would be made within “weeks, not months” at a joint news conference with her Swedish counterpart in Stockholm on Wednesday. “We need a view of the future, and we’re using this time to analyze and build common views on the future in terms of security,” Marin explained. “I’m not going to give you a timeline for when we’ll make our decisions, but I believe it’ll be fairly quick. Not within months, but within weeks.”

On Wednesday, the Finnish government presented a comprehensive report to the country’s parliament on the effects of NATO membership.

According to the report, if Finland and Sweden join NATO as full members, “the threshold for using military force in the Baltic Sea region would rise,” enhancing “regional stability in the long run.”

The “most significant effect” of NATO membership, according to the report, “would be that Finland would be part of NATO’s collective defense, and would be covered by the security guarantees enshrined in Article 5,” and that the deterrent effect of being a NATO member would be “considerably stronger than it is now, as it would be based on the capabilities of the entire Alliance.”

The report warns that if Finland applied for NATO membership, it should be prepared for “risks that are difficult to anticipate” due to Russia’s “negative view of NATO enlargement.” Finland “would aim to maintain functioning relations with Russia in the event it becomes a NATO member,” it continues.

Since the invasion, public opinion in both countries has shifted dramatically, and NATO allies and officials are generally supportive of the two countries joining. The only serious objection could come from Hungary, whose leader is close to Putin, but NATO officials believe they can persuade Prime Minister Viktor Orban to change his mind.

Given that Putin began his war by demanding that NATO revert to its 1990s borders, the fact that this is even being considered is a diplomatic disaster for Moscow. And if Finland joins, Putin will find himself sharing an additional 830 miles of NATO border with his country.

Dmitry Peskov, a Kremlin spokesman, warned on Monday that expanding NATO would not bring more stability to Europe.

On Tuesday, Rob Bauer, the head of NATO’s military committee, told reporters that the alliance had not ruled out new members, but that the decision was ultimately up to Finland and Sweden.

Ukraine’s desire for closer integration with the West has not been stifled by Putin’s invasion. While it is unlikely that the country will join NATO, its efforts to join the European Union have accelerated since the war began. This would take a long time and might face strong opposition from Hungary, which is already embroiled in a bitter dispute with Brussels over rule of law violations, prompting the EU to propose suspending central funding to Budapest.

Members of NATO have already discussed red lines and what action should be taken if chemical weapons are used, but the specifics are still being kept secret to prevent Russia from taking pre-emptive protective action.

Any NATO intervention, on the other hand, would almost certainly result in a less secure security situation in Europe, as the West would risk a military confrontation with Russia, a nuclear power that would almost certainly respond by intensifying its attacks on Ukraine and possibly other traditional Russian spheres of influence.