FILE - In this Saturday, Oct. 10, 2015 file photo, North Korean leader Kim Jong Un, right, waves his hands with Chinese official Liu Yunshan during a military parade to mark the 70th anniversary of the North's ruling party and trumpet Kim's third-generation leadership in Pyongyang, North Korea. The two men raised their clasped hands above their heads like a pair of victorious athletes, as international media and tens of thousands of North Koreans looked on. The gesture during a high-profile celebration in Pyongyang seemed designed to scotch appearances that their countries have been drifting apart. (AP Photo/Wong Maye-E, File)
(The Associated Press)

FILE - In this Saturday, Oct. 10, 2015 file photo, North Korean leader Kim Jong Un, right, waves his hand with Chinese official Liu Yunshan during a military parade to mark the 70th anniversary of the North's ruling party and trumpet his third-generation leadership in Pyongyang, North Korea. The two men raised their clasped hands above their heads like a pair of victorious athletes, as international media and tens of thousands of North Koreans looked on. The gesture by the North Korean leader and a top Chinese official during a high-profile celebration in Pyongyang seemed designed to scotch appearances that their countries have been drifting apart. (AP Photo/Wong Maye-E, File)
(The Associated Press)

BEIJING – The two men raised their clasped hands above their heads like a pair of victorious athletes, as international media and tens of thousands of North Koreans looked on. The gesture by North Korean leader Kim Jong Un and a top Chinese official during a high-profile celebration in Pyongyang seemed designed to scotch appearances that their countries have been drifting apart.

Now the big question: Will warmer relations with China moderate the North's provocative and unpredictable behavior, seen by many as the biggest threat to peace and security in northeast Asia?

Liu Yunshan, the ruling Communist Party's fifth-ranked official, was Kim's most prominent foreign guest at Saturday's military parade and mass rally marking the 70th anniversary of the founding of the Worker's Party of Korea. Liu and Kim shook hands and raised their arms together on the balcony of the palatial People's Grand Study House.

The evening before, the two had met at a state guesthouse where Liu handed Kim a personal letter from Chinese President Xi Jinping renewing the traditional friendship between the communist neighbors and stating China's desire to further develop ties, according to China's official Xinhua News Agency.

Kim, Xinhua said, responded that Liu's presence was a sign of the "deep affection" between the sides and a "great encouragement" to the North.

"I believe this visit will play a major role in transmitting the North Korea-China friendship and developing bilateral relations," Kim was quoted as saying.

Liu closed his remarks by reiterating China's hopes for a resumption of six-nation talks on ending North Korea's nuclear weapons programs, something Pyongyang has refused to do since they bogged down in 2009, stifling one of Beijing's more successful diplomatic gambits.

Kim did not respond directly, saying only that North Korea wanted peace and improved relations with South Korea to build its economy and improve quality of life. North Korea has repeatedly said it has no intention of giving up its limited nuclear weapons capability.

"I think this is a gradual restoration of a sense of normalcy between the two countries," said Jingdong Yuan, a specialist on Asia-Pacific security at Australia's University of Sydney. "Bilateral relations have really been strained to some extent because of North Korean provocations."

It's conceivable that Liu's visit has already discouraged a new provocation. Weeks before Saturday's parade, comments in North Korean media had led some analysts to suspect the North planned to mark the party anniversary with a satellite launch that would have been viewed internationally as an illegal test of long-range-missile technology. With no launch occurring, some now speculate that Liu's presence in Pyongyang was a deterrent.

Given the extreme insularity of the relationship — and uncertainty about the extent of Chinese influence over the North — it's always difficult to assess the true state of relations.

However, ties clearly have taken a hit over the almost four years since Kim took power following the death of his father, Kim Jong Il, whose repeated visits to China underpinned the relationship.

The younger Kim has yet to make a trip to China. Liu is the first high-ranking Chinese official to visit North Korea since 2013.

The North's refusal to rejoin nuclear disarmament talks and insistence on going ahead with missile launches and nuclear tests, despite Beijing's objections, deeply angered the Chinese leadership. So did the shock 2013 execution of Kim's uncle Jang Song Thaek, who was known to be close to China.

Following North Korea's last declared nuclear test, in the spring of 2013, Beijing swiftly joined the chorus of international condemnation, called in the North Korean ambassador to protest, and, according to some indications, delayed shipments of goods across their border while agreeing to tightened U.N. sanctions.

Most recently, Kim snubbed a prestigious military parade in Beijing last month, instead sending an envoy, secretary of the ruling Korean Workers Party Choe Ryong Hae.

Yuan, the security analyst, said Kim may have realized that he could not afford to anger Beijing beyond a certain point and that a correction was needed.

"At some point, they have to restore relations because North Korea depends on China for so many things ... China remains the most important partner," Yuan said.

China accounted for the bulk of North Korea's estimated $7.61 billion in foreign trade last year and remains a crucial source of energy and food assistance. In return, China hopes North Korea will refrain from provocative acts, Yuan said.

China also longs for North Korea to reform its moribund economy along Chinese lines while retaining strict one-party rule. Observers have noted some improvements in the North Korean economy and further Chinese involvement could quicken the pace.

Recent problems in the relationship were "not structural" but "more sentimental," said Zheng Jiyong, director of the Center for Korean Studies at Shanghai's Fudan University.

China's sending a high-level official offered Kim a face-saving way to alter course, Zheng said. He added that the emphasis on traditional ties, rather than the nuclear issue, should help restore the relationship.

While Liu's visit is an important first step, questions remain as to why North Korea allowed ties to deteriorate to the extent that they did and whether it will accede to Chinese suasion over its nuclear programs.

The simplest explanation to the first question appears to be Kim's need to appear strong and independent, not beholden to Beijing or any other foreign or domestic power source.

"The North Korean leader just doesn't want to give their people an impression that he gives way under China's pressure," Zheng said.

And while Beijing will continue to support sanctions as long as Pyongyang remains in violation of U.N. resolutions, it's expected to soft-pedal the issue for now, said researcher Fang Xiuyu, also of Fudan University.

"If we pay attention too much to the negative elements, then we have no hope for the future," Fang said.