There was little time to spare.
As the last guest left the National Day reception that President Tony Tan Keng Yam and his wife Mary hosted at Gardens by the Bay, the President's car pulled up to take him home and then to the airport for his post-midnight flight to Brazil.
Hopes were high that swim star Joseph Schooling could win Singapore's first Olympic swimming medal at the 2016 Rio Olympics.
Some 30 hours later, at about 9pm on Aug 11 (local time in Rio), Dr Tan landed at Rio de Janeiro's Tom Jobim International Airport, swiftly donned a Team Singapore T-shirt and headed to the Olympic Aquatic Stadium.
He arrived in time to see the then-21-year-old clock the fastest time in the semi-finals for the 100m butterfly event.
Like many Singaporeans, the President began to dream that history could be made the next day.
It was. Recounting the moment of glory last year, his face lit up as he relived the 50.39-second swim, followed by the robust sound of Majulah Singapura, heard for the first time at the Olympics.
"It was a moment we all came together, you could feel the pride, excitement of Singaporeans," he says.
"It's one of the highlights of my presidency, that I was able to be there cheering for Joseph Schooling, not only with the Singaporeans who were there but also Singaporeans back home."
Equally jubilant, the Olympian later draped the gold medal on the President's neck before they posed for photographs. Dr Tan, 77, quipped: "This is the only time I will ever wear an Olympic gold medal."
It was a sweet end to a nail-biting episode at the start of Dr Tan's working visit to Brazil, one of at least 35 overseas trips he made in his six years as the country's chief envoy in promoting Singapore.
Of these, 25 were state visits, which is the highest level of international visits where one head of state is hosted by another.
These were made to, among others, all the Asean nations except Thailand - as its then-King Bhumibol Adulyadej was ill - as well as China, India, Australia and New Zealand. Some trips took him as far as Norway and Mexico.
Last October, Dr Tan went to Thailand to pay his respects to King Bhumibol at the Grand Palace after the monarch's death.
The President broke new ground on several occasions as well, being the first Singapore head of state to make state visits, for instance, to Latin America and the Holy See.
Each trip is painstakingly prepared by the President's Office and the Foreign Affairs Ministry, as a positive impression at the highest level can deepen ties, open doors for more business and project Singapore's image.
A high-level business delegation often goes along on these visits.
"When you make a state visit, the host country will form an impression of Singapore, depending on how they interact with you as president - is this a country worth cultivating, how do we strengthen ties," Dr Tan says.
"It's very important to put across our case for Singapore, that we are an open society, we have an open economy, we are in favour of freer trade and dealing with all parts of the world. We're not a closed society where people are prevented from speaking out," he stresses.
Each visit is also an opportunity for Dr Tan to raise issues that are important to Singapore, take into account the concerns of the host country and establish rapport with foreign leaders - and in so doing, strengthen the nation's network of friends and expand opportunities for its people and businesses.
The European Union-Singapore Free Trade Agreement (FTA) was one key area of cooperation he assiduously argued for when visiting European countries.
"It's still in the process of ratification, so when I visit European countries I stress to them the benefits of this FTA for their companies as well as for Singapore and the region, and how it can be a pathfinder eventually for an EU-Asean FTA."
Air connectivity is another topic he pursued as Singapore seeks to establish more agreements to let the national carrier's planes fly to, from and beyond other countries.
The President made two state visits in 2012, and four to six a year after that. These have included visits to celebrate Singapore's 50 years of diplomatic relations with countries such as Japan, France and Egypt.
The trips, which can last from a few days to more than a week if it includes visiting a neighbouring country as well, are packed with activities, ranging from state dinners and meetings with officials to cultural events and visits to educational institutions.
They can be tiring, Dr Tan says, as "you have to be alert all the time" and find issues relevant to both sides to discuss.
Sometimes, he has to address the misconception that Singapore is a closed society.
It has become more difficult nowadays because of social media and the Internet, where false statements can be circulated widely and do great damage even if they are taken down later, he adds.
But the key to tackling such fake news is to explain how the Singapore system works, he says, adding: "By and large, Singapore is quite well known now to all the countries. They know our positions, our foreign policy, our positions on economic policies."