MOSCOW - Russia took formal control over the de-facto borders of Georgia's rebel regions on Thursday a week before NATO military exercises in Georgia that President Dmitry Medvedev said amounted to a challenge from the West.

Medvedev signed pacts giving Russia direct control over the borders of the tiny rebel regions of South Ossetia and Abkhazia, which were both recognized by Moscow as independent states after a brief war between Russia and Georgia last year.

Russia has sharply criticized NATO military exercises that are due to begin on May 6 in Georgia, a crucial transit route for Caspian Sea oil and gas to Europe.

The planned NATO exercises are provocative, no matter how hard our Western partners try to persuade us of the opposite, Medvedev said after signing the security pacts.

Those who are taking these decisions will carry full responsibility for any negative consequences, he said.

Under the security deals, Russia gets formal control over the regions' borders for at least five years and the regions will have no jurisdiction over the Russian border guard posts.

Tensions over Georgia have been running high since Georgian President Mikheil Saakashvili's failed bid to retake the pro-Moscow breakaway region of South Ossetia in August.

Russia repelled the attack but provoked international condemnation for driving its troops further into Georgian territory and then recognizing South Ossetia and Abkhazia as independent states.

SPY SCANDAL

The war soured Russia's relations with the West and disagreements over Georgia could become a sticking point in efforts to improve ties with U.S. President Barack Obama.

A NATO diplomat told Reuters on Thursday that the alliance has ordered the expulsion of two Russian diplomats over a spy scandal in which an Estonian official was jailed for passing secrets to Moscow.

Two Russian diplomats have been told they are not welcome here, the diplomat said, speaking on condition of anonymity. The pair were attached to the Russian mission to NATO.

NATO ordered the diplomats out on Wednesday, the same day the alliance resumed formal talks with Russia at ambassadorial level, eight months after contacts were suspended over Russia's war with Georgia.

NATO says it does not understand why Moscow is upset by the long-planned military exercises involving 1,300 troops from 19 countries from May 6 to June 1.

Russia says the war games encourage Saakashvili to rearm and Moscow has complained that Georgia is massing troops at its de-facto borders with Abkhazia and South Ossetia. Georgia has also accused Russia of gathering forces close to the borders.

NATO says the exercises, to be held 20 km (12 miles) east of the capital Tbilisi, will be based on a fictitious U.N.-mandated, NATO-led crisis response operation and will not involve heavy weaponry.