SEOUL, South Korea (AP) — No matter who was on the private train that pulled into Beijing from Pyongyang overnight, one thing is clear: China still plays a major role in efforts to end North Korea’s nuclear program.

Just how much is still open to debate, but the apparent high-level visit shows that Kim Jong Un hasn’t forgotten his only major ally despite recent antipathy between the countries and bombshell announcements that the young North Korean leader will hold summits with his foes in Washington and Seoul. China, after all, provides the vital trade, aid and diplomatic support that keep the North and its broken economy afloat.

Because of North Korea’s dependence on China, it makes sense that Pyongyang would send a high-level delegation to Beijing for consultations before any major approach to the West.

"North Korea will try to remove any Chinese concern that it’s being passed over as Pyongyang attempts to shake up regional politics by reaching out to Seoul and Washington," said Koh Yu-hwan, a North Korea expert at Seoul’s Dongguk University.

The North Korean delegation will try to make the point that it’s "in the process of overhauling its external relations entirely, and not trying to leave China out of the picture," he said. "This will also be the message they want to send to the United States — the North obviously believes maintaining its traditional relationship with China would give it stronger influence over the United States."

There has been widespread speculation that the green and yellow train that arrived in Beijing on Monday was carrying leader Kim himself. Some analysts are doubtful though, saying it’s hard to imagine that a proud young leader who has proclaimed his nation a world power would sneak into Beijing under cover of night for his first face-to-face meeting with the Chinese leadership since taking power in 2011.

If it’s not Kim it could be his sister, Kim Yo Jong, who the leader sent to South Korea last month to attend the Winter Olympics bearing the offer of a summit. Another possibility is the train carried a grizzled military or political adviser, two of whom also went south last month.

Whoever it is, the move could also be part of a North Korean effort to gain leverage ahead of the planned talks with South Korean President Moon Jae-in and later U.S. President Donald Trump by showing that it has other options.

"Even if the situation surrounding its talks with Seoul and Washington plays out well for North Korea, it still needs China’s help," Koh said. "And if the situation doesn’t work out, North Korea will surely need Chinese support."

It may also be that the North recognizes some hard realities.

North Korea’s diplomatic outreach to South Korea and the United States followed an unusually provocative year of weapons tests and has been seen as an attempt, in part, to improve a struggling economy crushed the heavy sanctions those test brought about. North Korea’s provocations also took a toll on relations with Beijing.

Despite their decades-long alliance, forged during the 1950-53 Korean War, China has played a crucial role in international pressure against North Korea over its nuclear program and has signed on to increasingly strict UN sanctions. China’s strengthened actions in recent months — including restrictions on oil supply — may have significantly raised North Korea’s need to seek a diplomatic breakthrough.

For Beijing, it wants to be seen as a custodian of peace and stability in the region and also a larger player in world diplomacy as it competes with the United States for influence in Asia.

But it also has its own interests in mind. China is unhappy about having an emerging nuclear menace at its doorstep, but also doesn’t want to see a collapse of a next door government it sees as a buffer state against U.S. ally South Korea.

China has long advocated for a restoration of dialogue along the lines of the six-nation talks involving itself, North Korea, the United States, South Korea, Japan and Russia, accompanied by a pause in U.S.-South Korean war games and the North’s suspension of nuclear and missile activities.

If the North’s talks with South Korea and the United States fall apart, Pyongyang could move to demonstrate its nuclear weapons and missile capabilities again.

Du Hyeogn Cha, a visiting scholar at Seoul’s Asan Institute for Policy Studies, said in that case it’s likely that North Korea would seek China’s commitment for future support, or at least a promise it won’t hit the country too hard with more sanctions should it resume weapons tests.

Kim Tong-hyung has been covering the Koreas for The Associated Press since 2014.

Associated Press writer Christopher Bodeen in Beijing contributed.