The EU announced on Thursday that all its leaders agreed a €50bn aid package for Ukraine, including Hungary's Prime Minister Viktor Orban, who had previously blocked the agreement.
European leaders celebrated and Ukraine breathed a sigh of relief. Some saw the deal as proof that Hungary capitulated.
But Mr Orban returned to Budapest proclaiming victory too.
"We fought it out! They can't give Hungarian money to the Ukrainians!" Mr Orban posted on Facebook.
"We will not take part in the war, we will not send weapons, we remain on the side of peace!"
In fact, the deal represents a major climbdown.
Mr Orban insisted until now that the money for Ukraine should not come from the main 2021-2027 EU budget. He wanted the money divided into four tranches, with an annual meeting at which he or others could veto it.
Instead, there will be an annual debate, without the right to veto, and a bi-annual review.
Mr Orban's claim that "they can't give Hungarian money to the Ukrainians" is dubious, as the EU budget from which the €50bn ($55bn; £43bn) will be paid includes Hungarian contributions.
Another detail of the deal which is important to him is that payments to Ukraine will be dependent on respect for the Hungarian minority.
This is an important issue for the Hungarian government, which demands that the rights of some 75,000 ethnic Hungarians in Ukraine to study in their own language be restored to the 2015 level.
Hungarian and other minority languages were collateral damage in Ukrainian attempts to reduce the use of Russian in a series of laws implemented from 2016 onwards.
But in the end, confronted with a stark choice - to be with the EU or Russia, as put to him by Polish Prime Minister Donald Tusk - Mr Orban backed down, and chose the EU.
Mr Orban shifted swiftly from one battle he could not win - funds for Ukraine - to another which he would like to be associated with: the current wave of protests by European farmers over slashed subsidies and budgetary support. That could influence the outcome of European elections in June.
Ahead of the summit, Mr Orban made time to meet protesting farmers outside the EU institution buildings.
"It's a European mistake that the voice of people is not taken seriously," he told Hungarian RTL television in Brussels - a channel he doesn't usually speak to, because it is critical of his government.
"Not just relevant to the farmers but to the ordinary people. They are not taken seriously by the leaders," he said.
One accusation he levels at what he calls the "Brussels bureaucrats" is that, in their rush to support Ukraine, they have allowed cheap, allegedly poor quality Ukrainian grain to flood EU markets.
"The European Commission should represent the interest of the European farmers vis-a-vis Ukraine and not represent the interest of Ukrainian farmers against the European ones," Mr Orban told RTL.
This is vintage Orban. He issues a rallying call to his troops - usually hinted at in advance by one of his lieutenants - then the slogan is repeated constantly by his ministers and his media, until the public have learnt it by heart.
Earlier this week, his former Justice Minister Judit Varga, who will lead his Fidesz party's list for the European elections, posted on X: "Let's learn to drive tractors!"
Mr Orban and his Fidesz government hope that like-minded parties in Europe will make spectacular gains in the June elections, and Donald Trump will return to the White House in November. That will change the playing field for funds for Ukraine, despite Thursday's decision.