By Paul Reynolds
World affairs correspondent BBC news website
There are some clear winners and losers in the conflict over South Ossetia - and the crisis has shown the need for a fresh start in relations between Russia and the West.
Under pressure: Georgian President Saakashvili
First, the balance sheet:
Russia: It has emerged strongly, able to impose its will in South Ossetia and sending a clear signal about its readiness to assert itself.
It agreed to a ceasefire plan when its objective - control of South Ossetia - was achieved. The plan basically calls for no further use of force and some kind of return to the position before the conflict. However, Russia's foreign minister said Georgian troops would "never again" be allowed to resume their role as part of the joint peacekeeping force agreed with Russia in 1992. It is not clear whether Russian forces will be reduced to the battalion-sized unit allowed for in that agreement.
This is unlikely. Think more of Cyprus in 1974, when the Turks intervened, making similar claims about protecting their kith and kin. They are still there.
Prime Minister Vladimir Putin: He confirms that he is the power in the land. He gave strong performances throughout, especially when accusing the West of double standards by ignoring the casualties caused in Georgia's attempt to take over the enclave.
"What is surprising is the sheer scale of the cynicism - calling black white and white black, portraying aggressors as victims," he said. That goes down well at home.
The South Ossetians: The separatist movement will be in greater control now that Russia has taken over completely.
Old Europe: France and Germany, which are cautious about letting Georgia and Ukraine into Nato, will feel vindicated. They think that a country like Georgia with a border dispute should not yet be allowed in.
The dead and wounded and the refugees, of course: There are no accurate figures, but they might run into the hundreds. One problem has been the lack of reporting from inside South Ossetia. The initial Russian claim that a thousand and more were killed in the Georgian attack cannot be verified.
President Saakashvili of Georgia: He has been championed by the Bush administration but he failed in his attempt to impose Georgian control over South Ossetia and has to pay a price. Harsh words are being said about him by some European governments, where there has been private criticism of what one close observer called his "sudden and emotional" decision.
(Update 14 August: It is interesting however to see how President Saakashvili is trying to turn his position around, by gathering US and Eastern European support as the man who 'stood up' to the Russians. Other leaders have done this successfully before, for example Nasser in 1967 after the war with Israel.)
The truth: This has been a difficult conflict in which to sort out the facts. Russia failed to back up its claims of Georgian atrocities and did not allow reporters and international observers in to check them. Georgia made all kinds of claims that Russia was invading, including a statement that Russian troops had taken over the town of Gori which proved not to be so.
(Update 14 August: this reference was to a Georgian claim during the actual fighting, not to the subsequent Russian presence in Gori after the ceasefire.)
The US and UK at least have chosen to represent this as Russian aggression. Yet it was Georgia that attacked with a rocket barrage which by its nature was indiscriminate.
Rising Russia: Prime Minister Putin
The West: Once again, the West was taken by surprise. The word in Washington (and London) is that President Saakashvili was warned to exercise restraint. If so, not only has Russia come out on top against a potential Western Nato ally, but that potential ally ignored serious advice from its mentors.
This raises the issue of what happens now.
The need for a new start
The fact is that the West needs Russia and Russia needs the West. Russia wants (or will want) to be better integrated into the world economic system and to be taken seriously as a diplomatic partner.
The West needs Russian support in the confrontation with Iran and Sudan, for example.
And perhaps the West needs to acknowledge that the Russians did have a case. It needs to explain why it helped Kosovo but questioned Russia's right to help South Ossetia.
However, there is already talk in Western capitals about retaliating against Russia for what is seen as its "disproportionate" response to the Georgian attack.
I understand that the following measures are being considered:
Blocking a new Russia/EU agreement: This covers a wide range of issues from trade to human rights. The old agreement is running out and negotiations must start on a new one. It is a symbol of good co-operation.
Restating Nato's commitment to Georgian and Ukrainian membership: This was agreed in principle in April and might be reaffirmed at a Nato meeting in December. However, there is no timetable and realistically, the conflict probably puts this off into the distant future.
Blocking Russian membership of the World Trade Organization: There could also be a questioning of Russian membership of the G8 group of leading industrial countries.
Whatever the outcome, the fortunately relatively small-scale war over South Ossetia has highlighted the present unsatisfactory situation between Russia and what one still has to call the West.