Venezuelan president Hugo Chavez painted himself as a leader close to China, and a strong admirer of its late leader Mao Zedong.
But the reality was more complicated, with China agreeing deals for oil supplies and investing in the South American nation, but reluctant to grant political support to its strongman leader.
Chavez often praised Chinese leaders and once pledged to provide China with a long-term supply of oil from Venezuela's rich reserves.
His death quickly triggered discussion in the state media and the online community, with many supporting his anti-US stance and describing him as a "respectable" politician.
"Another anti-US strongman died. I pay tribute to Chavez. You will be remembered for a long time," said one microblog user. Another said: "It is very difficult to be a person who live up to his integrity."
But some were critical, saying Chavez was merely a dictator who showed no respect to his people.
"He is just more charismatic than North Korea leader Kim Jong-un," said one. "Yes, Chavez was elected by his people, and so was Adolf Hitler."
State media also carried extensive reports and commentaries on Chavez, with Xinhua predicting that his death would not lead to chaos in Venezuela, because military officials were close to Chavez and the government.
Sino-Venezuelan ties would remain stable under acting president Nicolas Maduro, who is likely to continue Chavez's China-friendly policies, the commentary said. Even if Henrique Capriles, an opposition politician, became Venezuelan president, the country would not make significant changes to bilateral ties, Xinhua said.
Chavez visited China six times. Under his presidency, Venezuela signed co-operation agreements with China that covered energy, agriculture, infrastructure, trade, finance and aviation.
The strong bilateral ties between the two nations were highlighted when president-in-waiting Xi Jinping visited Venezuela as vice-president in 2009. He and Chavez signed agreements allowing for preliminary steps towards drilling projects and multiple refineries on Chinese soil.
"We know that Venezuela has the largest oil reserves in the world," Chavez said when receiving Xi.
"All the oil that China needs for its development in the next 200 years is here in Venezuela."
In addition to the energy deals, China also granted a US$4 billion loan to Venezuela, which will be used to boost development projects such as railways. China has become Venezuela's biggest foreign lender in recent years.
And Chavez is well known for his open adoration of Mao. When visiting Beijing in 2008, he said: "We are in the land of Mao Zedong and I pay tribute to him. I am a Maoist."
He would recite quotes by Mao, such as "Imperialism is a paper tiger", and said one of his favourite books was The Art of War, by Sun Tzu.
However, China has avoided showing ideological support to Chavez, with former Foreign Ministry spokesman Jiang Yu once saying that the two countries "have no ideological hue".
Dong Jingsheng, a Peking University professor who is familiar with Latin American affairs, said, "Sino-Venezuelan ties are largely built on pragmatic needs."
Pang Zhongying, a professor of international relations at Renmin University, said China was cautious and keen to avoid upsetting the United States with its ties to Venezuela. "The US is concerned with the interaction between China and Venezuela," he said. "China was very alert not to trigger any controversy concerning the geopolitical status of the region, and avoided showing political support to Chavez."
Both Dong and Pang said Sino-Venezuelan ties would not undergo significant changes even if the opposition came to power.