In a joint declaration after talks in Beijing between Chinese President Hu Jintao and Afghanistan President Hamid Karzai, the two countries expressed "strong rejection" of the "three forces" of terrorism, extremism and separatism, China's official Xinhua news agency reported.
The New York Times noted China is attempting to ensure a Muslim separatist group doesn't benefit from the Taliban when Western forces leave Afghanistan.
Xinhua reported Hu said China would be a "reliable neighbor to Afghanistan" and "unswervingly stick to friendly policies and continue to provide sincere and selfless help to the country."
Afghanistan was granted observer status this week in the Shanghai Cooperation Organization, comprised of China, Russia and four former Soviet republics in central Asia.
Hu expressed gratitude for what the government news agency called Karzai's "long-term commitment to bilateral friendly cooperation and his contribution to the development of bilateral ties."
China and Afghanistan also agreed to improve intelligence exchanges and boost cooperation in prevention of infectious diseases and disaster prevention and reduction.