Russia received heavy criticism on Monday after its troops pushed on from the secessionist territories of Abkhazia and South Ossetia towards the town of Gori in central Georgia, and into Senaki in the west.
On Tuesday morning there were more reports of fighting near Gori, but witnesses later said that Russian troops appeared to have pulled back from both towns.
SIX-POINT PEACE PLAN
No more use of force
Stop all military actions for good
Free access to humanitarian aid
Georgian troops return to their places of permanent deployment
Russian troops to return to pre-conflict positions
International talks about future status of South Ossetia and Abkhazia
French President Nicolas Sarkozy, in his current role as EU president, held talks with Mr Medvedev in Moscow for most of the day.
In a joint news conference, they said a six-point peace plan had been agreed by Russia and would now be taken to Georgia.
The deal included a pledge to pull troops on both sides back to their pre-conflict positions, and a plan to begin international discussions about the future status of South Ossetia and Abkhazia.
If Georgia agrees to the plan, Mr Medvedev said the "path to a gradual normalisation" in South Ossetia was open.
But during the same press conference, Mr Medvedev called Georgian troops "lunatics" and accused Georgian President Mikhail Saakashvili of lying over a previous ceasefire agreement.
And just hours earlier, tens of thousands of Georgians gathered in Tbilisi's main square to hear Mr Saakashvili claim that Russia was continuing its "ruthless, heartless destruction" of Georgian citizens.
Neither side's claims could be verified, but analysts point out that the inflamed rhetoric signifies how far away from an agreement they are.
In other developments:
• Nato said Russia's withdrawal announcement was "not enough" and that it deplored the "disproportionate" force used by Moscow.
• President Saakashvili said Georgia would leave the Commonwealth of Independent States (CIS) - a group which includes most of the former Soviet republics.
• He also announced that Russian peacekeepers in Georgia's other breakaway region, Abkhazia, would now be regarded as an occupying army - ending an agreement in place since 1994.
• Separatist rebels continued to fight against Georgian troops in the Kodori Gorge region of Abkhazia - the only area of Abkhazia still under Georgian military control.
• British oil firm BP closed a key pipeline that runs through Georgia.
According to a Kremlin statement, Mr Medvedev told his defence minister and chief of staff that "the goal has been attained".
"I've decided to finish the operation to force the Georgian authorities to peace. The safety of our peacekeeping forces and civilian population has been restored," he said.
Russia has invaded a sovereign neighbouring state and threatens a democratic government elected by its people
But Mr Medvedev warned that Russia would not tolerate any further Georgian military activity in South Ossetia, saying: "Should centres of resistance or other aggressive attempts arise, you must take the decision to destroy them."
Georgia also remained sceptical, the country's prime minister telling Reuters that troops would remain "mobilised... ready for anything" until a binding agreement was signed between the two countries.
The Russian move followed strong comments from US President George W Bush, in which he spoke directly of concerns that Russia was planning to topple Georgia's pro-Western president.
"Russia has invaded a sovereign neighbouring state and threatens a democratic government elected by its people," he said.
"Such an action is unacceptable in the 21st Century."
France's president says the ceasefire is good news
The BBC's diplomatic correspondent Bridget Kendall says Mr Medvedev's announcement must be seen in the light of the US president's words.
President Bush's language was unusually blunt, she says, and if Russia cares about its relations with the US and Europe, it might have been given pause for thought.
The five-day-old conflict began late on 7 August when Georgian forces bombarded South Ossetia, where a majority of people hold Russian passports.
Russia quickly became involved, bombing targets throughout Georgia and sending troops in to recapture South Ossetia.
Some 100,000 people are estimated to have been displaced by the conflict.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.