Israel was the big loser in the nuclear review conference in New York - and Iran the big winner.
Egypt came out a high scorer.
The cause of nuclear non-proliferation was haltingly served in that the conference did reach a consensus, unlike the last time, and a number of watered-down measures were agreed to seek ways of strengthening the nuclear Non-Proliferation Treaty (NPT). But overall, there was not the decisive strengthening that some states wanted.
Instead, governments rallied round one objective - the concept of a nuclear weapons-free zone in the Middle East. This was first called for 15 years ago but until now neglected.
To its annoyance, Israel found that the US did not block a proposal to hold a one-off conference in 2012 on setting up such a zone. In addition Israel was named for not being a party to the treaty and for not having its nuclear activities under international inspection. Being named like this is always regarded as a diplomatic defeat.
It will produce further soul-searching about the relationship between Israel and the US administration of President Barack Obama, which has often been tense and which will now be more so. Israel has already denounced the agreement as "hypocrisy".
Mr Obama came out with a statement afterwards that spoke of the US being "strongly opposed" to efforts to "single out Israel" but he did not use the veto available to him.
Whether the conference will be held is debatable (conditions are already being attached) and whether it will do anything practical is doubtful. Israel opposes any nuclear-free zone until there is a comprehensive peace. So does the US.
(Update: a Western diplomatic source has challenged the idea that Israel lost and Iran won. This source says that Iran was isolated in the talks and that the reference to Israel joining the NPT was "anodyne." Extremely critical language of Israel in early drafts had been removed.
Iran, the source claimed, was outmanoeuvred in that it has tried to block progress over the NPT. The conference was never about naming Iran but about stabilising the NPT and that was achieved.
Nevertheless, Israel does not see it that way. It complained that Israel had been "singled out" and that Iran was "not even mentioned."
A commentator in the Jerusalem Post said that Egypt had "hit Israel squarely on the jaw" and that the US had thrown Israel a "sucker punch."
Interpretations therefore vary.)
Arab countries, led skilfully by Egypt, managed to manoeuvre the US into agreeing to a Middle East conference. Washington did not want to be blamed for wrecking the talks. It would have undone much of the goodwill that Mr Obama has engendered over the past year through his efforts to reduce the American stockpile of nuclear weapons and to reconfigure US nuclear policy.
On the other hand, Iran was not named, despite being in violation of instructions both from the IAEA, which administers the nuclear non-proliferation treaty, and the Security Council that it should suspend the enrichment of uranium. Instead there were a couple of references to countries not being in compliance and since Iran is the only such state, Iran is meant. But it is not named. Iran would have blocked the necessary consensus if it had been.
It was ready to stop a consensus. The US was not.
"It is good that there was an outcome," said Mark Fitzpatrick of the International Institute for Strategic Studies in London.
"It restores the consensus about the importance of the NPT, which had been unravelling. The NPT was in danger and some new health and vitality has been put back into it.
"However it doesn't move the ball forward or strengthen the NPT and is therefore a missed opportunity."
One example is that the US had pressed for countries leaving the NPT (as they can with three months' notice and as North Korea did) to face sanctions. This was not adopted, but at least it was stated that North Korea would not be recognised as a nuclear-weapons state, which will please South Korea.
Another is that there is not much immediate hope of getting the stronger inspections of nuclear plants that the US wanted. If no such action is forthcoming, the US attitude towards further disarmament could well be affected.
Nor, from the opposite side, was there agreement to set a deadline or even a target for nuclear-weapons states to negotiate their weapons away. Some non-aligned countries had wanted sometime after 2025 as the target. There is no date in the document. Instead there is language pressing for progress. Indeed, there has been some progress over the past year, with a new agreement between Russia and the United State as an example.
The next NPT review conference is in 2015.