U.S. President Joe Biden and Chinese President Xi Jinping engaged in blunt talks over Taiwan and North Korea on Monday in a three-hour meeting aimed at preventing strained U.S.-China ties from spilling into a new Cold War.

Amid simmering differences on human rights, Russia’s invasion of Ukraine, and support of domestic industry, the two leaders pledged more frequent communications. U.S. Secretary of State Antony Blinken will travel to Beijing for follow-up talks.

“We’re going to compete vigorously. But I’m not looking for conflict, I’m looking to manage this competition responsibly,” Biden said after his talks with Xi on the sidelines of the G20 summit in Indonesia.

Beijing has long said it would bring the self-governed island of Taiwan, which it views as an inalienable part of China, under its control and has not ruled out the use of force to do so. It has frequently accused the United States in recent years of encouraging Taiwan independence.

In a statement after their meeting, Xi called Taiwan the “first red line” that must not be crossed in U.S.-China relations, Chinese state media said.

Biden said he sought to assure Xi that U.S. policy on Taiwan, which has for decades been to support both Beijing’s ‘One China’ stance and Taiwan’s military, had not changed.

He said there was no need for a new Cold War, and that he did not think China was planning a hot one.

“I do not think there’s any imminent attempt on the part of China to invade Taiwan,” he told reporters.

On North Korea, Biden said it was hard to know whether Beijing had any influence over Pyongyang weapons testing. “Well, first of all, it’s difficult to say that I am certain that China can control North Korea,” he said.

Biden said he told Xi the United States would do what it needs to do to defend itself and allies South Korea and Japan, which could be “maybe more up in the face of China” though not directed against it.

“We would have to take certain actions that would be more defensive on our behalf… to send a clear message to North Korea. We are going to defend our allies, as well as American soil and American capacity,” he said.

Biden’s national security adviser Jake Sullivan said before the meeting that Biden would warn Xi about the possibility of enhanced U.S. military presence in the region, something Beijing is not keen to see.

Beijing had halted a series of formal dialogue channels with Washington, including on climate change and military-to-military talks, after U.S. House of Representatives Speaker Nancy Pelosi upset China by visiting Taiwan in August.

Biden and Xi agreed to allow senior officials to renew communication on climate, debt relief and other issues, the White House said after they spoke.

Xi’s statement after the talks included pointed warnings on Taiwan.

“The Taiwan question is at the very core of China’s core interests, the bedrock of the political foundation of China-U.S. relations, and the first red line that must not be crossed in China-U.S. relations,” Xi was quoted as saying by Xinhua news agency.

“Resolving the Taiwan question is a matter for the Chinese and China’s internal affair,” Xi said, according to state media.

Taiwan’s democratically elected government rejects Beijing’s claims of sovereignty over it.

Taiwan’s presidential office said it welcomed Biden’s reaffirmation of U.S. policy. “This also once again fully demonstrates that the peace and stability of the Taiwan Strait is the common expectation of the international community,” it said.

SMILES AND HANDSHAKES

Before their talks, the two leaders smiled and shook hands warmly in front of their national flags at a hotel on Indonesia’s Bali island, a day before a Group of 20 (G20) summit set to be fraught with tension over Russia’s invasion of Ukraine.

“It’s just great to see you,” Biden told Xi, as he put an arm around him before their meeting.

Biden brought up a number of difficult topics with Xi, according to the White House, including raising U.S. objections to China’s “coercive and increasingly aggressive actions toward Taiwan,” Beijing’s “non-market economic practices,” and practices in “Xinjiang, Tibet, and Hong Kong, and human rights more broadly.”

Neither leader wore a mask to ward off COVID-19, although members of their delegations did.

U.S.-China relations have been roiled in recent years by growing tensions over issues ranging from Hong Kong and Taiwan to the South China Sea, trade practices, and U.S. restrictions on Chinese technology.

But U.S. officials said there have been quiet efforts by both Beijing and Washington over the past two months to repair relations.

U.S. Treasury Secretary Janet Yellen told reporters in Bali earlier that the meeting aimed to stabilise the relationship and to create a “more certain atmosphere” for U.S. businesses.

She said Biden had been clear with China about national security concerns regarding restrictions on sensitive U.S. technologies and had raised concern about the reliability of Chinese supply chains for commodities.

G20 summit host President Joko Widodo of Indonesia said he hoped the gathering on Tuesday could “deliver concrete partnerships that can help the world in its economic recovery”.

However, one of the main topics at the G20 will be Russia’s war in Ukraine.

Xi and Putin have grown close in recent years, bound by their shared distrust of the West, and reaffirmed their partnership just days before Russia invaded Ukraine. But China has been careful not to provide any direct material support that could trigger Western sanctions against it.