Beijing on Friday gave a cautious response to the capture and death of former Libyan leader Moammar Gadhafi, saying it respects the choice of the Libyan people.
"China unswervingly respects the Libyan people's choice and the important position of Libya's National Transitional Council in solving problems," foreign ministry spokeswoman Jiang Yu told reporters in Beijing.
"We hope Libya will establish an inclusive political transition process as early as possible to safeguard Libyan national solidarity and unity," Jiang said.
She pledged Beijing's continued support for reconstruction in Libya.
China in June hailed the Libyan opposition as an "important political force" during a visit by its leader to Beijing, in the first public indication it had distanced itself from Gadhafi's regime.
Beijing, which has significant oil interests in the North African state, abstained in March when the U.N. Security Council authorized NATO-led air strikes against Gadhafi's forces.
Commenting on Gadhafi's death, Jiang said only: "Libya has turned a new page on its history."
However, she added that Beijing had always preferred the use of peaceful means rather than armed conflict to settle disputes in Libya.
The reaction of Chinese netizens was a good deal less diplomatic.
"Gadhafi is dead, and huge numbers of Libyan people came out onto the streets to celebrate," wrote Beijing-based movie director Feng Xiaogang via his verified Sina microblog account, which has 5.75 million followers.
"Six months ago, when he was in power, masses were out on the streets...supporting him," Feng wrote. "The Libyan people put everything into their acting...I think they should win an award."
User @shiyudexiaowo responded: "The people are the people," while @zhuyeqingcanglangshui added, "Don't talk to me about the people. Too messed up!"
Many commented on the universality of political change.
"Those who understand political affairs go with the flow and prosper, and those who oppose it die," wrote @youyideyu. "It has been this way for all eternity, both here in China and elsewhere."
Talk show hostess Yang Lan said Gadhafi should have known that there was no other way out for him. "It was just a question of when and how," she wrote on Sina Weibo, where she has 4.42 million followers.
"It's not just a generation, but a whole dynasty that has fallen amid chaos and violence. It is a huge satire on political power."
Meanwhile, Hu Xijin, editor-in-chief of the Communist Party-backed Global Times newspaper, started a debate about the nature of democracy.
"What the announcement of the capture symbolizes...is that democracy is an irresistible force, and every country should set up an effective democracy," Hu wrote via his verified Sina Weibo account, which has 1.38 million followers.
User @zhongguochenmodedaduoshu, whose name means "China's silent majority," said democracies could be divided into higher, middle and lower-grade versions.
"There is no such thing as a total democracy, neither is there such a thing as a total absence of democracy," the user wrote.
Rights groups say the Chinese government has detained dozens of dissidents and lawyers since February, amid fears of a "Jasmine" revolution inspired by recent uprisings in the Middle East.
Reported by Luisetta Mudie.