BALI, Indonesia — Prime Minister Hun Sen of Cambodia said on Tuesday that he had tested positive for Covid-19 and that his delegation would cut short its trip to Bali for the Group of 20 summit.

In the last three days, Mr. Hun Sen has met with more than 12 world leaders, including President Biden and Prime Minister Justin Trudeau from Canada. They had all flown from their respective countries to Phnom Penh (the capital of Cambodia), for the Association of Southeast Asian Nations meeting, which began Saturday.

The White House stated to reporters Tuesday that Mr. Biden had been tested negative for disease that morning and was therefore not considered close to him, according the Centers for Disease Control and Prevention.

In a Facebook posting, Mr. Hun Su wrote that he had been tested daily before leaving Cambodia. This included just before boarding his plane for Bali, an Indonesian Island.

“It is lucky that I didn’t join the dinner that was organized by the French government with several heads of states last night, since I arrived late,” He stated.

Mr. Hun Sen said the Cambodia delegation would return home Tuesday and that he would skip the Asia-Pacific Economic Cooperation summit in Bangkok later in the week, where he had been scheduled to meet with China’s top leader, Xi Jinping, and President Emmanuel Macron of France.

On Saturday, Mr. Hun Sen and Mr. Biden exchanged hands in Phnom Penh. They were both wearing masks. The meeting lasted approximately half an hour. M. Biden coughed as he spoke to reporters on Monday night and said that he was suffering from a cold.

Sun Narin Reporting from Phnom Penh in Cambodia by contributors Jim Tankersley Bali.