China hailed the death of Osama bin Laden in a US raid while defending its regional partner Pakistan against accusations it had done too little against terror threats.
Beijing and Washington have gone through bouts of friction over Taiwan and Tibet, regional security and most recently China's clampdown on dissent and human rights activists.
China showed no appetite, however, for turning the US raid that killed bin Laden on Pakistani soil into a point of dispute.
"We have noted the announcement and believe that this is a major event and a positive development in the international struggle against terrorism," foreign ministry spokeswoman Jiang Yu said.
Next week, officials from China and the United States meet in Washington for a strategic and economic dialogue, annual talks to help manage disagreements over trade, currency issues and foreign policy.
But the Chinese spokeswoman made a point of standing by Pakistan, Beijing's closest partner in south Asia, which has faced criticism from US politicians and others that the discovery of bin Laden hiding so close to Islamabad showed Pakistan had done too little to fight terror threats.
That criticism has raised the possibility of a widened rift between Washington and Islamabad.
"Pakistan stands at the forefront of the international struggle against terrorism," Ms Jiang told a regular news conference, after her initial statement on bin Laden had appeared.
"The Pakistani government's determination to fight terrorism is staunch and its actions have been vigorous. Pakistan has made important contributions to the international struggle against terror," she said. "China will continue staunchly supporting Pakistan developing and implementing its own anti-terror strategy based on its own national conditions."
China has said separatist militants in its far west Xinjiang region have been supported by foreign extremists.
Critics of Beijing's policies in Xinjiang, which shares a border with Pakistan, have said it has exaggerated those links to justify political and religious controls on the restive Muslim Uighur minority.
China and Pakistan call each other "all-weather friends" and their close ties have been underpinned by longstanding wariness of their common neighbour, India, and a desire to hedge against US influence in the region.
China is building nuclear reactors in Pakistan despite grave misgivings from other countries, which fear proliferation and safety risks.
Bin Laden's death and any rift between the United States and Pakistan will not affect Beijing's policies toward Islamabad, said Guo Xian'gang, vice president of the China Institute of International Studies, a government think tank.
"China's role in Pakistan won't change because of this. In the eyes of the Chinese government and people, bin Laden was a terrorist ringleader," said Mr Guo. "But I do think we have to understand that his death does not mean the death of al-Qaeda - there's still the real risk of counter-attacks."
China is a member of the 15-nation UN security council yesterday welcomed the news "that Osama bin Laden will never again be able to perpetrate such acts of terrorism".
"China has always opposed all forms of terrorism," said Ms Jiang. "China advocates that the international community enhance international anti-terror cooperation and adopt comprehensive steps to treat both the symptoms and the root causes of terrorism."
Reuters