Queen Elizabeth returned to IMO headquarters in London on Tuesday to mark the organisation's 70th anniversary.
The UK monarch unveiled a new plaque commemorating the occasion, 35 years after she officially opened the building in 1983.
She also cut a cake and visited an exhibition about the role of modern shipping.
Secretary general Kitack Lim said: "Your Majesty, I know that you have a deep personal interest in ships and the sea, as your presence here today clearly shows."
He added: "We are celebrating 70 years of achievement, in which the truly vital industry of shipping has become safer, cleaner and greener, thanks to the work of IMO.
"We are also looking ahead to the exciting new challenges on the horizon.
"Billions of ordinary people, all over the world, rely on shipping every day of their lives – even if they don't realise it or understand it.
"It is our role to ensure shipping can continue to make this vital contribution to global well-being."
The United Nations agency was established in Geneva in 1948 and came into force ten years later, meeting for the first time in 1959.
It has 173 member states and three associate members.