President Trump spoke to around 20 world leaders before calling China's president, Xi Jinping.

But he finally did it Thursday evening.

And despite earlier remarks threatening to upend long-standing U.S. policy, Trump promised Xi that Washington will stick to the "One China" doctrine.

That policy was enacted when the U.S. established diplomatic relations with Beijing almost 40 years ago. It allows the U.S. to maintain relations with both China and a de facto independent Taiwan.

Beijing considers Taiwan a province of China; the U.S. position is by design ambiguous, asserting that China and Taiwan are both parts of "One China."

A White House statement called the conversation "lengthy" and "extremely cordial." The two leaders extended wishes to the other's peoples, and issued invitations to their respective countries.

Trump appeared to break his awkward post-inauguration silence with Beijing when the White House announced on Thursday that he had sent a letter to Xi, expressing hopes for a "constructive relationship" and offering wishes for a prosperous "Year of the Rooster." The letter was sent nearly two weeks after the start of Chinese New Year.

This makes Trump only the latest in a series of U.S. presidents who have railed against Beijing while on the campaign trail, only to be forced by geopolitical realities and U.S. business interests to fall back on established policies once in office.

For example, Ronald Reagan threatened to normalize ties with Taiwan in 1980. Bill Clinton called out the "butchers of Beijing" in 1992. George W. Bush in 2000 labeled China a "strategic competitor."

But none of them made substantial moves to alter China policy after being elected. Chinese officials say they learned long ago to take the election-cycle posturing with a grain of salt.

In December, Trump enraged Beijing by taking a congratulatory call from Taiwanese President Tsai Ing-wen after his election victory. That contravened decades of U.S. China policy that proscribed contact between the two countries' leaders. Taiwan paid former Sen. Bob Dole, working as a lobbyist, to arrange the call.

Then Trump suggested he would scotch the One China policy unless Beijing made concessions on trade. He also complained that China wasn't doing enough to talk North Korea out of its nuclear ambitions. And Trump threatened to slap heavy tariffs on Chinese imports.

The U.S. president has appointed a number of pro-Taiwan critics of China to key Cabinet and advisory positions. Secretary of State Rex Tillerson suggested during his confirmation hearing that the U.S. should blockade disputed islands controlled by China in the South China Sea.

Trump's long delay in communicating with Xi has reinforced China's fears of a confrontational new administration, at a time China can least afford it: the run-up to the ruling Communist Party's 19th National Congress this fall, where Xi is expected to secure a second five-year term.

Beijing considers Taiwan's status as a province of China to be non-negotiable, and has threatened to invade the island if it declares independence.

The Trump-Xi phone call came on the eve of Japanese Prime Minister Shinzo Abe's U.S. visit, which will include a weekend of golf with Trump at the president's Mar-a-Lago club in Florida. Beijing's relations with Japan are frosty.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.