POTI (AFP) - Russian troops laboured Thursday over a tentative pullout from Georgia as Moscow vowed to strengthen its military after last month's war and turned its diplomatic fire on Ukraine. Russian Prime Minister Vladimir Putin dismissed Western accusations that Russia's military intervention into Georgia was part of an "imperial" agenda. "We do not have and will not have any of the imperial ambitions that people accuse us of," Putin said in the southern resort of Sochi. Russian President Dmitry Medvedev said Georgia's August 7 assault on South Ossetia meant Russia would have to think about re-arming its military. "We should concentrate on questions of military re-equipment," Medvedev said in the Kremlin. "Without any doubt this decision is influenced by the crisis in the Caucasus, Georgia's aggression and its continued militarisation." International tensions flared Thursday with Russia accusing Ukraine's pro-Western government of taking an "unfriendly" stance over the war and of infringing the rights of Russian-speaking residents. Ukraine is a strong ally of Georgia. "Ukrainian authorities have recently been pursuing policies that cannot be seen as anything other than unfriendly towards Russia," a strongly-worded Foreign Ministry statement said. Western officials fear Ukraine's large ethnic Russian population could leave it exposed to intervention from Moscow, with the EU's enlargement commissioner warning Ukraine could be Russia's "next target." Putin sought to reassure the West that this would not be the case. "We do not have any desire or basis for infringing the sovereignty of former Soviet republics," the Russian leader said in Sochi. Meanwhile, South Ossetia does not intend to join the Russian Federation, Russian Foreign Minister Sergei Lavrov said Thursday as the separatist Georgian region's separatist leader seemed to flip-flop over the issue. "I don't know where you have heard this information. South Ossetia doesn't want to enter anywhere," Lavrov said, in response to reported comments by Eduard Kokoity that the region wanted to be part of Russia. Lavrov, paying his first visit to an EU member state since the Georgia crisis erupted, was speaking in a joint Press conference with Poland's Foreign Minister Radoslaw Sikorski in Warsaw Thursday. "South Ossetia has understood that without proclaiming independence, it cannot ensure its own security," Lavrov added. "And the Russian Federation has understood that without recognising this independence, it cannot guarantee the survival of the Ossetian nation," he said. Kokoity was quoted by Interfax news agency as saying earlier Thursday that his breakaway region will become part of Russia " but then he backtracked on his remarks. "We are not planning to give up our independence, achieved at the cost of colossal casualties, and South Ossetia is not planning to join Russia," Interfax quoted him as saying later. Lavrov accused the US of seeking to encircle Russia, and reiterated Moscow's opposition to US plans to install a missile shield on Polish soil. He also accused Washington of preparing "not only a third, but also a fourth and fifth region in which to station (missile shield elements) and not just close to Russia's European borders." "We're asking these questions of our American partners," he said.