By Andrew Osborn
MOSCOW (Reuters) - Russian President Vladimir Putin on Thursday warned NATO against cultivating closer ties with Ukraine and Georgia, saying such a policy was irresponsible and would have unspecified consequences for the alliance.
The issue has been a source of anger for Russia -- which shares a border with both countries and does not want to see them join what it regards as a hostile military bloc -- since 2008 when NATO leaders promised Ukraine and Georgia they would one day join the alliance.
Putin, speaking to Russian diplomats from around the world assembled in Moscow, said on Thursday there was a need to restore trust in Europe and spoke out against what he said was NATO's attempts to deploy new bases and military infrastructure near Russia’s borders.
"We will respond appropriately to such aggressive steps, which pose a direct threat to Russia," said Putin.
"Our colleagues, who are trying to aggravate the situation, seeking to include, among others, Ukraine and Georgia in the orbit of the alliance, should think about the possible consequences of such an irresponsible policy."
The Russian leader said he had discussed the matter with U.S. President Donald Trump at a summit in Helsinki on Monday.
Trump has called for NATO members to spend more on defense, but has queried whether Montenegro, the alliance's newest member, should be part of the bloc at all calling its people "aggressive."
Russian forces entered two breakaway Georgian regions in 2008 and annexed Ukraine's Crimea in 2014 after which a pro-Russian separatist uprising erupted in eastern Ukraine.
Swathes of both countries remain garrisoned by Russian troops, something Moscow says is in keeping with local people's wishes, but which the West and the governments of the two countries call an illegal occupation.
NATO leaders discussed ties with Ukraine and Georgia - both former Soviet republics once ruled from Moscow -- at their summit in Brussels earlier this month.
Prominent politicians in both countries are keen to join the Western military alliance, but have seen their chances of joining hampered by Russian territorial incursions.
Under NATO rules, countries with territorial conflicts cannot join NATO.
Related Video: Trump's New Post-Summit NATO Talking Point
(Editing by Richard Balmforth)