Russia said on Thursday that Finland's bid to join NATO was a hostile move that "definitely" posed a threat to its security.
The Kremlin said it would respond but declined to spell out how, saying this would depend on how close NATO moves military assets towards the 1,300 km (800-mile) Finnish-Russian frontier.
The Russian Foreign Ministry said Russia would need to take "retaliatory steps, both of a military-technical and other nature, in order to stop threats to its national security arising".
"Helsinki must be aware of the responsibility and consequences of such a move," it said.
The Finnish move, which Sweden is expected to replicate, confronts President Vladimir Putin with the very outcome he said his war in Ukraine was designed to prevent – a further expansion of NATO to Russia's borders.
"Finland joined the unfriendly steps taken by the European Union towards our country. This cannot fail to arouse our regret, and is a reason for corresponding symmetrical responses on our side," Kremlin spokesman Dmitry Peskov told reporters.
Finland's president and prime minister said earlier on Thursday their country must apply to join the NATO military alliance "without delay."
- Putin's Ukraine War Could Push His Neighbors Into NATO's Hands
- Why the Russia-Ukraine War Is a Global Turning Point
- NATO, Nazis and the Motherland: Putin's Full Victory Day Speech
Asked whether this presented a threat to Russia, Peskov said: "Definitely. NATO expansion does not make our continent more stable and secure."
Russia's war has led both Finland and Sweden to move towards abandoning their long-held neutrality and seeking the shelter of the alliance's security umbrella.
Asked what form Russia's response would take, Peskov replied: "Everything will depend on how this (NATO) expansion process plays out, the extent to which military infrastructure moves closer to our borders."
Former Russian president Dmitry Medvedev, the deputy chairman of the powerful Security Council, has previously spoken about potentially stationing nuclear-armed missiles in the Russian territory of Kaliningrad on the Baltic Sea.
Peskov was also asked about comments from Medvedev on Thursday that increasing military support by the United States and its allies for Ukraine risked triggering a conflict between Russia and NATO, with a potential risk of nuclear war.
He replied that everyone wanted to avoid a direct clash between Russia and NATO, but also repeated a warning from Putin that Moscow was ready to deal "the most decisive response" to anyone who tried to interfere with what it calls its special military operation in Ukraine.