Finnish lawmakers voted on Wednesday to overturn a Cold War-era total ban on nuclear weapons, which the Finnish government says will strengthen the NATO alliance but which could also risk heightening tensions with Russia.

Finland is not a nuclear state and has repeatedly said it does not plan to become one. Other NATO countries do have weapons, but until now Finland could not host them — either as a deterrent or to support the alliance in times of emergency.

With the change, Finland will allow its allies’ weapons to be imported into, transported through or held on its territory to defend Finland or assist NATO.

“The nuclear deterrence is, in the end, the guarantor of peace in Europe,” Heikki Autto, the chair of the defense committee in Finland’s Parliament, said in an interview on Wednesday. “It’s the ultimate deterrence against the Russian aggression.”

Finland joined NATO only in the wake of Russia’s full-scale invasion of Ukraine in 2022. Over the past couple of years, it has been eyeing its neighbor as Russian forces beef up bases and build military infrastructure near their 830-mile border, now the longest Moscow shares with NATO.

This year, Finland announced plans to increase its military spending, and in recent months, top Finnish officials argued that overturning the weapons ban would keep Finland safer and allow it to better support its NATO allies.

“By dismantling the Cold War-era total ban on nuclear explosives, we are aligning our legislation with that of our closest NATO allies,” Antti Hakkanen, the defense minister, said on social media.

It is a major shift for Finland, which has tiptoed around its eastern neighbor for decades, and antinuclear advocates worry that the decision could antagonize Russia.

“It’s adding to the already existing tensions and risks, and feeding the Russian threat perceptions,” said Tytti Erasto, who researches nuclear issues at the Stockholm International Peace Research Institute.

Ms. Erasto said that Moscow could see it as a concrete signal “that NATO is actually making operational plans to increase the readiness of its nuclear weapons.”

Dmitry Peskov, the Kremlin spokesman, warned in March that “by placing nuclear weapons on its territory, Finland will begin to pose a threat to us,” according to The Moscow Times.

“And if Finland threatens us, we will take appropriate measures,” he said.

Melissa Parke, the executive director of the International Campaign to Abolish Nuclear Weapons, said that Finland has “kept itself safe not by matching threat with threat, but by refusing to escalate.” In a statement, she argued that the new decision could turn the country into “an obvious target.”

The new measure, which passed by 125 votes to 61, repealed an earlier provision that had prohibited all forms of nuclear explosives on Finnish soil.

Those restrictions dated back to the 1980s, when many Finns feared that the Soviet Union might take advantage of an earlier post-World War II treaty allowing it to exercise significant influence over Finland’s domestic and foreign policy.

For years after the fall of the Soviet Union, Finland avoided joining NATO, in part because it was wary of angering Moscow. Then came Russia’s invasion of Ukraine.

Finland became a NATO member the following year. And today, despite its small population, the Nordic country already has one of Europe’s strongest militaries and a whole-of-society focus on emergency preparedness and defense.

Its soldiers have also taught other Western troops how to fight in Arctic conditions. Just this month, NATO opened a new land force between Finland and Sweden, which joined the alliance in 2024.

“Before NATO membership, Finland’s nuclear policy was naturally focused on arms control,” said Jyri Lavikainen, a nuclear deterrence expert at the Finnish Institute of International Affairs. “Now,” he said, “deterrence comes first.”

The change could lead to closer work with France, which is expanding its nuclear arsenal and wants to deploy some of its nuclear-armed aircraft to allied countries. France’s president, Emmanuel Macron, described the plans in March as a “forward” nuclear deterrence scheme.

Finland has fielded some interest from France, Yle, the national broadcaster, reported this month. Prime Minister Petteri Orpo of Finland told Helsingin Sanomat, Finland’s biggest newspaper, that he had expressed interest to Mr. Macron.

The nuclear change is another step away from Finland’s longstanding policy of military nonalignment, and is fueled by “a much more widespread feeling of insecurity in Finland than in many decades,” said Heikki Patomaki, a professor of world politics at the University of Helsinki.

Now, he wrote in an email, “security has come to be understood primarily as something achievable through deterrence, and that deterrence is aimed primarily at Russia.”

But there is a paradox, he said: “As military forces and deterrence are strengthened, the sense of insecurity and the probability of violent conflict increase.”