MOSCOW, July 30 (Reuters) - Former Russian President Dmitry Medvedev, who has sometimes raised the spectre of a nuclear conflict over Ukraine, said on Sunday that Moscow would have to use a nuclear weapon if Kyiv's ongoing counter-offensive was a success.

Medvedev, who is deputy chairman of Russia's Security Council, a body chaired by President Vladimir Putin, said in a message on his official social media accounts that Russia would be forced to fall back on its own nuclear doctrine in such a scenario.

"Imagine if the.. offensive, which is backed by NATO, was a success and they tore off a part of our land then we would be forced to use a nuclear weapon according to the rules of a decree from the president of Russia.

"There would simply be no other option. So our enemies should pray for our warriors' (success). They are making sure that a global nuclear fire is not ignited," he said.

Medvedev, who has cast himself as one of Moscow's most hawkish voices, appeared to be referring to part of Russia's nuclear doctrine which sets out that nuclear weapons can be used in response to aggression against Russia carried out using conventional weapons which threatens the existence of the Russian state.

Ukraine is trying to retake territory which Russia has unilaterally annexed and declared to be part of its own territory, a move condemned by Kyiv and much of the West.

Putin said on Saturday that there were no serious battlefield changes to report in recent days and that Ukraine had lost large amounts of military equipment since June 4. Kyiv says its forces are making some progress in their drive to retake territory, albeit at a slower pace than desired.

Kremlin critics have in the past accused Medvedev of making extreme statements in an effort to dissuade Western countries from continuing to supply Ukraine with arms.