By ANNABELLE LIANG and ELAINE KURTENBACH

SINGAPORE (AP) — The rivalry between the U.S. and China in the Asia-Pacific is proving “awkward” for Southeast Asian nations that do not want to have to choose between their friends, Singapore’s prime minister said Thursday as he wrapped up a regional summit.

“It’s easiest not to take sides when everybody else is on the same side. But if you are friends with two countries which are on different sides, then sometimes it is possible to get along with both, sometimes it’s more awkward if you try to get along with both,” Lee Hsien Loong said when asked about the competition between the U.S. and China in the region at a news conference.

Lee, who hosted the annual summit of the Association of Southeast Asian Nations, said countries whose economies and strategic interests are deeply entwined with both powers would prefer not to have to decide, “but the circumstances may come where ASEAN may have to choose one or the other. I hope it does not happen soon.”

The comments appeared intended to send a message to the U.S., represented this week by Vice President Mike Pence in place of President Donald Trump, and to China, whose growing influence across the region is abundantly clear at such international gatherings.

Trade tensions between the U.S. and China over Beijing’s technology policy and other market access issues have added to strains within the region, especially since Trump took office in early 2017. The two sides have imposed tariffs on billions of dollars of each other’s products in a standoff that has shown no sign of easing.

Lee also remarked on Trump’s “America First” deal-oriented diplomacy, saying it was a departure from the past, when “they were generous, they opened their markets, they made investments, they provided regional security, and in the indirect benefits of a prospering region, the U.S. prospered along.”

“But now they say ‘no, that’s not good enough. I want every deal to come,’ and that will mean a different kind of relationship and we will have to get used to it if the U.S. decides that this is the direction which they would go in the long term,” Lee said.

In comments to the gathering earlier in the day, Pence stressed the American commitment to the region, where he said there was no room for “empire or aggression.”

In a veiled swipe at China’s growing influence and military expansion in the South China Sea, he said that “Our vision for the Indo-Pacific excludes no nation. It only requires that every nation treat their neighbors with respect, they respect the sovereignty of all nations and the international rules of order.”

The ASEAN meetings focus on enhanced trade and security in a region of more than 630 million people. They ended with commitments to work toward a regional free trade agreement and enhance cybersecurity, counter-terrorism efforts, e-commerce, disaster preparedness and environment protection.

Many of the same leaders will head to the Asia-Pacific Economic Cooperation forum in Papua New Guinea, where many of the same issues will be on the agenda.

While in Singapore, Chinese Premier Li Keqiang sought to reassure China’s neighbors over its expanding reach, both economic and military, across the region and urged fellow Asian leaders to help reassure world markets roiled by trade tensions.

Southeast Asian countries and others in the region share China’s consternation over the Trump administration’s rejection of multilateral trade regimes and the global trade system that have helped them modernize and enrich their economies. Many of the leaders attending the meetings in Singapore have emphasized the need to fight protectionism and safeguard the rules that help govern global trade.

The region needs to “take concrete action to uphold the rules-based free trade regime and to send a message — a positive message — to the market to provide stable, predictable and law-based conditions for the market,” Li said.

Security issues, in particular managing conflict in the South China Sea, were another major focus of the meetings. The sea is a potential flashpoint, and a huge concern for the U.S. and other countries that rely on the right of passage for shipping.

China is pitted against its smaller neighbors in multiple disputes in the sea over coral reefs and lagoons in waters crucial for global commerce and rich in fish and potential oil and gas reserves.

ASEAN leaders said they discussed the need for restraint in the area.

“We all agreed on ways and means not to increase tensions in the South China Sea. And that means not bringing in warships and allowing for freedom of navigation,” Malaysian Prime Minister Mahathir Mohamed told reporters. “Small patrol boats are needed to deal with piracy, mainly, but big warships may cause incidents and that will lead to tension.”

Philippine President Rodrigo Duterte, who has relaxed his country’s stance on Chinese claims to islands also claimed by Manila, said it also was crucial that the countries involved finish work on a “code of conduct” to help prevent misunderstandings that could lead to conflict.

“China is there. That is the reality,” he told reporters before joining the day’s meetings. “Strong military activity will prompt a response from China. I do not mind everybody going to war, but except that the Philippines is just beside those islands. If there is shooting there my country will be the first to suffer.”

The sessions Thursday followed scores of bilateral meetings among the leaders.

While the gathering was typically focused on cooperation and goodwill, concerns over Myanmar’s treatment of its ethnic Rohingya Muslims flared with unusually sharp, public comments both by Pence and Mahathir to the country’s leader, Nobel Peace Prize laureate Aung San Suu Kyi.

More than 700,000 Rohingya have fled from western Myanmar’s Rakhine state to escape killings and destruction of their homes by the country’s military and vigilantes, drawing widespread condemnation and international accusations of genocide against Myanmar.

Asked if Suu Kyi had agreed to his direct request that she pardon two Reuters’ journalists imprisoned in Myanmar, Pence replied, “We did not get a clear answer on that.” He said Suu Kyi had given some details on the appeals process and judicial handling of their cases.

ASEAN groups Brunei, Cambodia, Indonesia, Laos, Malaysia, Myanmar, the Philippines, Singapore, Thailand and Vietnam. Its annual summit includes meetings with various other nations.

Next year’s summit is planned in Thailand, whose capital Bangkok was the site of the 1967 meeting that created ASEAN.