Russia has a right and in some cases obligation to use all available means to protect its security, including potentially nuclear weapons, Russian Security Council's Deputy Chairman Dmitry Medvedev said.
In an article, published on Monday, Medvedev accused Ukraine and NATO countries of creating situations in which Russia could allow a nuclear strike.
Nevertheless, he added, Moscow has not seen a "direct necessity" to use nuclear weapons so far in the war in Ukraine.
He wrote that before taking such a decision, President Vladimir Putin "always relies on a comprehensive analysis of all factors" and on proportionality between actual harm and the response.
"Obviously, so far the course of events in the Ukrainian crisis has not created a state of direct necessity to use nuclear weapons," he said.
Medvedev cited the 1996 advisory opinion of the International Court of Justice (ICJ) on the legality of nuclear weapons, arguing that the court allows for a situation in which the survival of a nuclear state is at stake, and that international law does not ban a nuclear state from using nuclear weapons to save itself.
Such use, he said, would not be a crime under international law or a breach of any international legal regime.
Medvedev argued that Russia's nuclear doctrine does not directly provide for preventive use, and that Western deliveries of nuclear weapons to Kyiv, whether open or covert, could force Russia into a preemptive decision.
He said that the massive use of non-nuclear means that could cause catastrophes could be grounds for a Russian preemptive nuclear strike.
Medvedev said that if the conditions in the doctrine are met, the head of state is "not only entitled but obliged" to use nuclear weapons.
"Kyiv and its sponsors should have no dangerous illusions," he stressed.
He called German and NATO attempts to join nuclear deterrence "flawed," saying NATO's nuclear sharing is not a generally accepted interpretation of the Non-Proliferation Treaty (NPT), which he said is self-sufficient but weakened by selective enforcement.
Medvedev said the US attacked Iran under the pretext of defending the nonproliferation regime, even though Tehran has shown its commitment to it.
This reflects "double standards" and geopolitical motives, he added.