Traditionally, G-20 summits are staid affairs and despite the fact consensus on trade, development and climate issues regularly eludes the gatherings, at least efforts are made to conjure up formal bonhomie. But awkwardness rather than affability was more to the fore at this year’s meeting held in the Argentine capital Buenos Aires.

Heads of governments and states from the world’s wealthiest countries spent as much time Friday and Saturday trying to avoid face-to-face encounters with each other than having them. There were tight smiles, edgy handshakes.

British Prime Minister Theresa May noticeably steered clear of Russian Vladimir Putin throughout group meetings and photograph sessions — the first time she’s been in the same room as the Russian leader since the Salisbury poisonings.

Planned bilateral talks were canceled or downgraded to brief “pull-asides” or the oddly phrased “impromptu” meetings. Like a seething high school classroom, the snubs and slights were choreographed with intricate care, minimizing or maximizing the required scorn.

But it could have been a lot worse. The discord pitching nationalist leaders against those devoted to a multilateralist international order, between geopolitical upstarts and the powers of the West, between wayward authoritarian leaders and more measured, norm-observant democrats, and between protectionists and free-traders could have been laid much more bare.

And there were some signs of consensus-building as a result of fraught all-night talks Friday on fixing the global trading system — or at least reaching agreement about the aspiration to do so — with Europeans overcoming U.S. objections to the inclusion in the final summit communique of a commitment to reform the World Trade Organization (WTO), French officials said.

President Donald Trump has criticized the WTO and pursued aggressive trade policies targeting China and the European Union, who, he says, are taking advantage of the U.S.

And without too much public rancor at least, the Group of 20’s final statement on Saturday seemed likely to include support for the Paris climate accord, with the U.S. seeming satisfied with stating its formal opposition rather than trying to block a communique being issued.

Disagreements over migration issues appeared set to be watered down, with the final statement expected to vaguely mention the need to manage migration on a global level.

The dangerous military flare-up between Russia and Ukraine, the unresolved trade war between the U.S. and China, and sharp pre-summit disputes over climate change and nuclear arms control, as well as differences over whether to sanction Saudi Arabia for the killing of journalist Jamal Khashoggi, dogged the run-up to this year’s meeting. The events prompted fears that the summit could turn even more cantankerous than last year’s G-20 in Germany.

That didn’t happen, in part becasue of the strenuous efforts to keep a lid on the cauldron of disputes and resentments by the summit hosts, the Argentines, who did their best to reduce the opportunities for public conflict by replacing on the agenda as many contentious issues as they could with innocuous ones.

And there was one constructive event at the summit — the conclusion to two years of hotly debated trade negotiations between the U.S., Canada and Mexico, which saw U.S. President Donald Trump and his North American counterparts, Mexico’s Enrique Pena Nieto and Canada’s Justin Trudeau, sign a deal, known as the United States-Mexico-Canada Agreement (USMCA), to replace the 1994 North American Free Trade Agreement.

“Just signed one of the most important, and largest, Trade Deals in US and World History,” Trump tweeted Friday. “The United States, Mexico and Canada worked so well together in crafting this great document. The terrible NAFTA will soon be gone. The USMCA will be fantastic for all!”

But the USMCA, the haggling over a final communique, and discussions over development, infrastructure and investment issues were overshadowed by even more contentious political and geostrategic disputes — from the U.S.-China trade dispute to the conflict in Ukraine, from the Khashoggi slaying to the wars in Syria and Yemen.

Referring to the disputes, European Council President Donald Tusk told journalists: “As this is a difficult moment for international cooperation, I would like to appeal to the leaders to use this summit, including their bilateral and informal exchanges, to seriously discuss real issues such as trade wars, the tragic situation in Syria and Yemen, and the Russian aggression in Ukraine.”

He added: “I see no reason why the G-20 leaders shouldn’t have a meaningful discussion about solving these problems. Especially because all the instruments lie in their hands,” Tusk said. “The only condition is goodwill.”

But goodwill was in short supply. How far the leaders are from resolving political issues was on uneasy display with the cancellation or downgrading of bilateral meetings with counterparts. Those included Trump’s planned two-hour sit-down with Putin in protest, he said, of Russia’s recent seizure of three Ukrainian ships in the Black Sea, and formal meetings scheduled with the leaders of Turkey and South Korea, which were demoted to briefer encounters.

Britain’s May didn’t have a bilateral with President Trump. The U.S. leader has been critical of the Brexit deal she’s trying to cajole a reluctant British parliament to approve, suggesting it could thwart any future trade deal between the U.S. and Britain.

Nor did she sit down with Putin, also because of Russian naval aggression in the Black Sea as well as the Salisbury poisonings allegedly carried out by Moscow-directed intelligence operatives earlier this year.

And, amid continuing international outrage over the killing of journalist Khashoggi in Saudi Arabia’s consulate in Turkey last month, most leaders avoided associating too closely with Saudi Crown Prince Mohammed bin Salman. During a group photo marking the start of the summit, the prince stood at the far edge of the group, largely ignored.

On Friday, Trump met the crown prince only briefly in passing, exchanging formal pleasantries, White House aides said.

In an exchange accidentally caught on video, the crown prince and French President Emmanuel Macron appeared to have a tetchy exchange, with Macron complaining, “You never listen to me.” It was unclear if that exchange was tied to the fallout from the Khashoggi slaying.

Aides and security staff of the Saudi royal have been fired, others arrested, in the death of Khashoggi October 2 in the Saudi consulate in Istanbul, and the CIA has reportedly assessed the prince gave the order for the execution.

Prime Minsiter May did hold a bilateral with MBS, as he is known, with Downing Street issuing a statement saying she had told him that the Gulf kingdom needed “to build confidence that such a deplorable incident could not happen again.”

Only Putin, who has been accused himself of endorsing assassinations of journalists and other critics, seemed happy to see the crown prince, enthusiastically high-fiving the Saudi royal Friday at the summit and beaming as they clasped each other’s hands like long-lost friends as they sat down together at the large ring-shaped table for the first group session.