"With the signing and ratification of the treaty we initialed today, the troops will be there on an international-legal basis. These are not peacekeepers, this is a military contingent whose number is defined by the Defense Ministry in consultation with its partners in South Ossetia and Abkhazia," Sergei Lavrov told journalists.
Lavrov also said Russia, Abkhazia and South Ossetia have initialed agreements on friendship, cooperation and mutual assistance, and the documents would be signed by the presidents in the near future.
Earlier Tuesday, Russian Defense Minister Anatoly Serdyukov said about 3,800 service personnel will be based in each republic.
Russia recognized South Ossetia and Abkhazia on August 26, two weeks after it had concluded a military operation in response to an attack by Georgian forces on August 8 on the breakaway republic of South Ossetia.
Russia was condemned by the international community for its "disproportionate" response to Georgia's attack and Moscow's recognition of Georgia's breakaway provinces. Nicaragua is the only other country to recognize their independence.
The Russian top diplomat said at a news conference with his South Ossetian and Abkhaz counterparts that all sides had agreed on Tuesday to take joint measures to counter any foreign aggression.
"Russia, South Ossetia, and Abkhazia will take all possible measures jointly to remove and prevent threats to peace or attempts to destroy peace and to counter acts of aggression against them on the part of any country or any group of countries," Lavrov said.
Abkhazia and South Ossetia broke away from Georgia following the collapse of the Soviet Union in the early 1990s. Georgia has long sought to bring the breakaway regions back under its control, while accusing Russia of trying to annex the republics.
Lavrov said Russia has already selected potential candidates for the posts of ambassadors to Abkhazia and South Ossetia. His Abkhaz and South Ossetian counterparts Sergei Shamba and Murat Dzhioyev confirmed that they had also selected envoys to Russia.
The Russian minister said the UN Security Council will not consider extending the UN mandate for Abkhazia without the participation of the republic's representatives.
The UN mission mandate expires on October 15. "This time the Security Council will not make a decision without the participation of Abkhaz representatives," Lavrov said.
"Discussing regional security issues, including the security of South Ossetia and Abkhazia, is senseless without their participation," Lavrov said.