Russia agreed on Tuesday that its co-operation deal with European Union states would cover the bloc's 10 new members too, averting a potential crisis just four days before the EU's historic eastward expansion.
"It's been an excellent morning's work," EU External Relations Commissioner Chris Patten said as he signed the new pact with Russian Foreign Minister Sergei Lavrov and Ireland's Brian Cowen. "I wish every morning was as productive."
The Partnership and Co-operation Agreement regulating ties between Moscow and the current 15-member EU will now also cover the 10 new countries that join the bloc on Saturday - most of them former communist satellites of Moscow.
Russia had resisted extending it automatically, fearing the loss of trade privileges with its closest neighbours, and had also raised last-ditch objections over the treatment of Russian minorities in acceding states.
But Lavrov played down both issues at a news conference.
Russia had initially said EU enlargement would cause it substantial losses, but now says it will suffer no loss at all.
Asked to explain this "miracle", Lavrov replied: "There was no miracle. There were just rumours and anecdotes."
Moscow had also wanted to add a call, in a joint statement, for the "social integration" of minorities within the EU as a way of highlighting the status of Russians in the former Soviet Baltic republics of Estonia and Latvia.
The EU insisted this be dropped, saying that all EU states already meet stringent criteria on human rights and minority treatment, making the extra language unnecessary.
After days of wrangling, it was omitted from the final text, but Lavrov denied this was a Russian climbdown.
"The European Union has subscribed to high levels of protection for national minorities, and they will be respected throughout the bloc," he said. "We fully trust our partners."
As late as Monday evening, disagreement over this final point had threatened to hold up signature of the deal, which has been a sore point between Moscow and the bloc for months.
But that was forgotten as Lavrov, Patten and Cowen toasted each other in "Russian champagne, imported duty-free to the European Union", a beaming Lavrov joked in English.
The joint statement contained other language to salve Russian pride at seeing its former satellites joining the wealthy European bloc while Moscow remains outside.
"The EU and Russia reaffirm their commitment to ensure that EU enlargement will bring the EU and Russia closer together in a Europe without dividing lines," it declared.
Russia and the EU are members of the Quartet, with the United States and the United Nations, promoting a Middle East peace process. Cowen, whose country holds the bloc's current presidency, said their talks had been useful ahead of a Quartet meeting in New York on May 4.
They also discussed Afghanistan and Iraq and agreed to work "to strengthen international security based on effective multilateralism", Cowen said, "with a strengthened United Nations at its heart".