BEIJING—China is setting its sights on a key role in North Korea’s future, seeking to be part of any peace treaty, weapons inspections and economic assistance, after emerging as a surprise beneficiary of the summit between the U.S. and North Korean leaders.

Chinese officials are expected to stake out their positions for a post-summit North Korea when U.S. Secretary of State Mike Pompeo visits Beijing on Thursday to discuss the outcome of the talks between President Donald Trump and North Korean leader Kim Jong Un.

At the top of China’s agenda are an easing of the economic sanctions that pressured North Korea into negotiations and working on ways to provide security guarantees to give Pyongyang the confidence to dismantle its nuclear program.

While China worried that its interests might get short-shrift in the Trump-Kim summit, the meeting unexpectedly proved favorable to Beijing. The summit’s vaguely worded agreement to pursue denuclearization without providing details on how or when to achieve that goal gives Beijing time to lobby Washington, Seoul and Pyongyang for a direct role in negotiations, Chinese experts said.

“This will allow China to breathe easy and not worry about being sidelined,” said Zhu Feng, an international security expert at China’s Nanjing University. He expects Beijing to push for talks on a peace agreement to formally end the 1950-53 Korean War.