South Korea's reassurances to China over its security concerns paved the way for better relations and President Moon Jae In's state visit, analysts said.
Mr Moon's visit has, in turn, boosted ties between the neighbours strained by Seoul's deployment of an anti-missile system that Beijing said hurt its security interests.
But what could have motivated the Chinese to mend ties with Seoul could be the strategic importance of a good relationship with the South Koreans, said analysts.
Mr Moon met President Xi Jinping on Thursday, during which the leaders pledged to improve ties and cooperate on resolving the North Korean nuclear issue peacefully.
During Mr Moon's meeting with Premier Li Keqiang yesterday, Mr Li said the two sides may soon reopen communication channels to discuss economic and trade issues, Korean media reported.
South Korea had agreed in July last year to deploy the US Terminal High Altitude Area Defence (Thaad) anti-missile system, at a time of rising tension in the Korean peninsula as North Korea stepped up its nuclear and missile development programmes.
However, the Chinese objected to the deployment as they think the missile defence system undermined its strategic security interests. It took economic retaliatory measures that shaved off 0.3 percentage point from the country's growth this year.
But things took a turn for the better in late October with the two sides agreeing to put ties back on track. This has been made possible through Seoul's agreement to conditions known as the "Three Nos" - no deployment of additional Thaad batteries, no joining of a US-led missile defence network and no trilateral security alliance with the US and Japan.
This provided some assurance to the Chinese and, besides, they may have realised it was impossible to get the South Koreans to drop Thaad completely, said security analyst Li Mingjiang of the S. Rajaratnam School of International Studies.
"Coercing the South Koreans to do so will further damage China-South Korean ties and ultimately push South Korea much closer to the US," he said. This, he added, will be detrimental to China's security environment in North-east Asia.
On the other hand, better ties with the South Koreans would undermine any US plan to further strengthen its military presence and deterrent capability against China, particularly the American plan to link up its anti-missile defence systems into a network in the region, he said.
On the nuclear issue, China and South Korea are opposed to war in the region and if they could articulate this together, it would more significantly constrain the United States, he said.
And if war should occur, "a more positive relationship between Beijing and Seoul will help China deal better with the aftermath", including resettlement of refugees, reunification of the Korean peninsula and the US military presence there, said Associate Professor Li.