President Trump on Saturday retrieved a Marine's hat and placed it on the Marine's head after it blew off amid turbulence from the president's helicopter.

As Trump approached Marine One, he bent to pick up a white hat from the ground before turning to the Marine. After placing it on the Marine's head, Trump patted him on the arm.

But the hat immediately flew off the Marine's head, forcing the president to chase it down as the Marine stood at his post, where he remained until the president boarded.

WATCH: Before boarding Marine One, President Trump stops to retrieve a Marine's hat that was blown off by the wind pic.twitter.com/zxBrhW1S2p — NBC News (@NBCNews) July 9, 2017

ADVERTISEMENT

Trump was at Andrews Air Force Base outside Washington after returning from the Group of 20 summit in Hamburg, Germany, the past two days. He flew Marine One to the White House.

The G-20 summit brought together world leaders from 20 industrialized countries to discuss global matters such as trade, climate change and terrorism.

Trump met with powerful figures including German Chancellor Angela Merkel and Russian President Vladimir Putin while in Germany.

--This report was updated on July 9 at 12:41 p.m.