Manila: Nevertheless, he persisted.

President Donald Trump, after some brief, initial confusion, managed to successfully execute a traditional handshake for a group photo at a summit in the Philippines.

But first, the president’s unintentionally comedic struggles went viral.

Appearing at the Association of Southeast Asian Nations summit here, Trump was momentarily befuddled by the traditional group handshake, in which the leaders cross their right arm over their left and grasp the hands of the fellow participants on both sides.

“Give us your brightest smile,” an emcee intoned, as the leaders lined up onstage for their star turn.

But Trump could not quite do that, nor could he muster the ritual greeting.

The president first crossed his hands in front of him, and then, after glancing at the leaders on either side, made a second attempt, this time lifting his arms outward, according to an Associated Press report.

Finally, Trump alighted on the correct pose: He strained to reach the hand of the far shorter Philippine President Rodrigo Duterte on his left and completed the manoeuvre with a wincing grimace.

Handshakes have long held outsized significance for Trump, who uses the greeting to size up potential rivals, assert his dominance, or convey warm sentiments.

In Brussels in May, Trump and French President Emmanuel Macron engaged in a jaw-clenching, face-tightening, knuckle-whitening handshake for six full seconds, with each man trying to claim the alpha status.

In February, Trump greeted Japanese Prime Minister Shinzo Abe, with whom he has a friendlier relationship, with a handshake that lasted 19 seconds, included two firm pats from Trump on the back of Abe’s hand, and ended with the president declaring, approvingly, “strong hands.”

This week, on Trump’s first stop in Japan on his five-country, 12-day Asia trip, a fist bump between the president and Abe while golfing was viewed as a sign of the good relations between the two leaders.

And a March photo opportunity, in which Trump failed to shake hands with German Chancellor Angela Merkel in front of cameras, was viewed as a snub of the German leader. But speaking to reporters Saturday as he flew from Danang, Vietnam, to Hanoi, Trump brought up the missed greeting unprompted, saying he simply hadn’t heard the calls for him to shake hands with Merkel.

“I get along very well with Angela,” he said. “You people don’t write that. I actually get along really well with Angela.”