U.S. President Joe Biden and Chinese President Xi Jinping traded barbs Monday over Taiwan, with Xi stressing that the question of the self-ruled island is "the first red line that must not be crossed," but agreed to develop "principles" to manage their intensifying competition.

In their first in-person summit, which took place in Indonesia's Bali, Biden expressed objections to China's "coercive and increasingly aggressive actions" toward Taiwan, saying they undermine peace and stability across the Taiwan Strait and jeopardize global prosperity, according to the White House.

Their marathon talks, lasting three and a half hours in a meeting on the sidelines of the annual summit of the Group of 20 major economies on the Indonesian resort island, followed a sharp deterioration of Sino-U.S. relations over an August visit to Taiwan by House of Representatives Speaker Nancy Pelosi as the third-highest ranking official in the United States.

U.S. President Joe Biden (L, Getty/Kyodo) and Chinese President Xi Jinping. (Kyodo)

China reacted harshly to Pelosi's Taiwan visit by conducting large-scale military drills near the self-ruled democratic island and suspending bilateral dialogues in a range of areas, including climate change and defense exchanges.

Biden said at a post-summit press conference that he sees no "imminent attempt" by China to attack Taiwan, even as Beijing's pressure on the island continues.

China and Taiwan have been governed separately since they split in 1949 due to a civil war. China regards Taiwan as a renegade province to be reunified with the mainland, by force if necessary.

Biden reaffirmed the U.S. commitment to the one-China policy, under which it recognizes Beijing as the country's sole legal government.

The two leaders agreed to dialogue and cooperation on public health, agriculture and food security while also underlining the need to jointly tackle climate change.

They also agreed that U.S. Secretary of State Antony Blinken will visit China to follow up on their discussions, according to the White House.

Taiwan's Foreign Ministry thanked Biden for reaffirming the U.S. commitment to maintaining peace and stability across the Taiwan Strait.

The ministry said Taiwan will continue to "work closely with like-minded countries to jointly fight against authoritarianism" as a responsible member of the democratic camp in the Indo-Pacific region.

The United States switched its diplomatic recognition from Taipei to Beijing in 1979, but it has maintained unofficial relations with Taiwan and supplies it with defensive weapons under an act passed by Congress that same year.

On the economic front, Biden raised concerns about Beijing's nonmarket economic practices, while Xi warned Washington against "pushing for decoupling and severing supply chains" in reference to U.S. tightening of export control on high-end chips.

Biden expressed wariness over China's alleged human rights violations in Xinjiang, Tibet and Hong Kong.

Besides bilateral issues, Biden and Xi also affirmed their objections to the use or threat of use of nuclear weapons in Ukraine, which has been fighting back against Russia's aggression for months.

China has refrained from condemning Russia's invasion of Ukraine and is not joining Western nations in imposing sanctions on Moscow, but Xi pointed out that Beijing is "highly concerned" about the current situation in the Eastern European country, according to the Chinese Foreign Ministry.

The U.S. president also raised concerns about North Korea's provocative behavior as the country continues to test-fire ballistic missiles, urging "all members of the international community" to encourage it to act "responsibly." China is North Korea's closest and most influential ally economically.

At the outset of the talks, Biden said the two major powers share a responsibility to show they can "manage" their differences and "prevent competition from becoming anything ever near conflict."

Xi said the two leaders need to "chart the right course" for Washington-Beijing relations and elevate the bilateral ties.

Prior to the Bali summit, Biden and Xi had held five meetings by phone or virtually since the U.S. president's inauguration in January 2021.

The latest meeting was the first face-to-face encounter between the heads of the two countries since Xi met Biden's predecessor Donald Trump on the sidelines of a G-20 summit in Osaka in June 2019.

The talks also followed the start of Xi's unprecedented third five-year term as the ruling Communist Party chief last month and the Biden-led Democratic Party retaining control of the U.S. Senate by performing above expectations in last week's midterm elections.

Biden and Xi last met face-to-face in Davos, Switzerland, in January 2017, according to a senior U.S. official. At that time, Biden was vice president in the administration of President Barack Obama.

Related coverage:

Biden to urge Xi to call on North Korea to restrain provocations

Blinken reiterates China's plan to "speed up" Taiwan reunification

China hints at upholding "zero-COVID" policy even after congress