In a video from the conference, Trump can be seen walking onto the stage where Macri was waiting, and then shaking his hand.
Macri appears to have wanted Trump to wait onstage as the leaders of the G20 countries were to take the annual “family portrait.”
After they shake hands, Trump can be seen leaving the stage as Macri motions him to come back.
After Trump exits, the words, “Get me out of here” can be heard, though it’s not clear what they’re referring too.
Trump returned to the stage a few minutes later with the rest of the group to pose for the photograph.
WATCH: G20 leaders pose for ‘class photo’ group shot as summit gets underway
The G20 brought together world leaders to discuss important topics, mostly about trade.
The group called for reform of the World Trade Organization, the U.S. and China talked tariffs and the U.S.-Mexico-Canada Agreement was officially signed.
Major world events like the Ukraine-Russia conflict and climate change were also on the table.
Another awkward moment at the summit came when French President Emmanuel Macron confronted Saudi Prince Mohammed bin Salman.
Salman is under pressure for how his regime is handling the investigation of the killing of Saudi journalist Jamal Khashoggi. Khashoggi was a frequent critic of bin Salman.
Macron was captured on video seemingly lecturing bin Salman, at one point being heard saying, “I am worried,” ″You never listen to me,” and “I am a man of my word.” Macron said the crown prince only “took note” of his concerns.
WATCH: Saudi crown prince Mohammad bin Salman arrives at G20 dinner
Trump also briefly met with bin Salman on the sidelines of the summit. A White House official told Politico the two “exchanged pleasantries” as Trump had with other world leaders at the summit.
Trump has come under fire for a lackluster response to Saudi Arabia regarding the Khashoggi killing; Trump has maintained that bin Salman hasn’t admitted guilt, while his administration has sanctioned the 17 Saudi nationals who were involved.