Rex Tillerson concluded his first trip to Asia as secretary of state, sounding optimistic about the prospects for U.S. cooperation with China on the North Korean nuclear issue.

The upbeat notes he struck in Beijing contrasted with his remarks on Friday in Seoul about how all options, including military strikes against North Korea, remain on the table.

As if to underline the seriousness of the situation, even as Tillerson was discussing North Korea with his Chinese hosts, North Korean leader Kim Jong-un presided over the test launch of a new rocket engine. Pyongyang called the test "of historic significance," although its capabilities and possible uses are not yet clear.

On Sunday, Tillerson made no public mention of the test as he met with President Xi Jinping in the cavernous Great Hall of the People on Beijing's Tiananmen Square.

Both men effused about phone calls and letters exchanged so far between Xi and President Trump. Tillerson's visit is expected to pave the way for their first meeting, as early as next month, at Trump's private club in Mar-a-Lago, Florida.

"I also appreciate your comment," Xi told his guest, "that the China-U.S. relationship can only be defined by cooperation and friendship." It's not clear when or to whom Tillerson made such a remark.

At a press conference on Saturday with his Chinese counterpart, Tillerson noted that the U.S. would continue to raise thorny issues with China, including maritime disputes in the South China Sea, as well as human rights and religious freedoms.

But North Korea's continued progress towards putting a nuclear warhead on a missile capable of striking U.S. territory has forced the North Korea issue to the forefront of U.S.-China relations.

"We renewed our determination to work together," Tillerson said, "to convince the North Korean government to choose a better path and a different future for its people."

Tillerson said Beijing and Washington agree that the situation on the Korean peninsula has "reached a rather dangerous level."

He added, "We've committed ourselves to do everything we can to prevent any type of conflict from breaking out, and we view there are a number of steps that we can take," without saying what they might be.

Tillerson dodged a reporter's question about where the U.S. might draw a "red line," the crossing of which might trigger a military strike.

Nor did he address a query about whether Trump's remarks on Friday on Twitter, complaining about China's inaction on the North Korean issue, had made Tillerson's trip to China more difficult.

Tillerson drew criticism back home for not taking the diplomatic press corps along on his Asia trip. The only journalist allowed on his plane was a reporter for the Independent Journal Review, which is reportedly owned, in part, by an advisor to Vice President Mike Pence.

The U.S. embassy notified journalists of Saturday's briefing about four hours before the event.

Tillerson's counterpart, Foreign Minister Wang Yi, meanwhile insisted at the briefing that the U.S. had reached a "fundamental consensus" on dealing with the North Korean issue.

Wang said that includes strictly implementing U.N. sanctions on North Korea, while seeking a resumption of six-party negotiations, with the ultimate goal of ridding the Korean peninsula of nuclear weapons.

North Korea in 2009 walked out of the talks hosted by China, and swore it would not return.

To the surprise of many observers, Tillerson referred to a mutual U.S.-China understanding of "non-conflict, non-confrontation, mutual respect, and win-win cooperation."

This was a near-verbatim repetition of the Chinese government's framework for relations with the U.S. Beijing refers to it as a "New Type of Great Power Relations." At its core, it implies that the U.S. and China are not only both great powers, but co-equals.

The Obama administration was reluctant to adopt Beijing's formula. Instead, it envisioned using its signature "pivot to Asia" policy to shore up American primacy in Asia and the Western Pacific.

Tillerson's use of Beijing's formula may leave the Trump administration open to criticism that either Tillerson bent over too far backwards to placate his Chinese hosts, or he failed to articulate the U.S. vision of the relationship, perhaps because it has yet to come up with a coherent policy towards China and Asia. Or both.

President Trump's campaign rhetoric about a punishing China for its policies on trade, Taiwan and the South China Sea has somewhat moderated since taking office.

China, for its part, has reacted to Trump with restraint, as it prepares for a crucial leadership transition this fall. The ruling communist party will hold its 19th national congress, which is expected to give Xi Jinping a second five-year term as head of the party, state and military.

China's dissatisfaction towards North Korea continues to grow with each missile or nuclear test that Pyongyang carries out, in defiance of Beijing's warnings. But China has not changed its bottom line of avoiding actions that would destabilize Kim Jong-un's regime.

And analysts point out that the North Korea crisis actually gives Beijing some leverage over Washington, or at least, distracts it from applying more pressure on China.

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