For the first time in nearly 50 years, a senior Chinese official has visited Afghanistan and signed a series of agreements in an example of increased foreign interest in the nation ahead of the planned withdrawal of US troops by 2014.
Zhou Yongkang, China's domestic security chief, met President Hamid Karzai at his garden palace in Kabul, state media said on Sunday.
Zhou made the four-hour visit the day before - a secretive trip not announced beforehand - aimed at shoring up ties between the neighbours, the Xinhua news agency reported.
The new security and commercial agreements were not specific, Reuters news agency reported, although Zhou pledged to help "train, fund and equip Afghan police".
The last senior Chinese official to visit Afghanistan was President Liu Shaoqi, in 1966, Xinhua said.
Beijing has stepped up diplomacy with Afghanistan in recent months as the deadline for the withdrawal of US and NATO forces draws nearer.
| Our complete Afghanistan coverage
China, which shares a 76km border with Afghanistan's far northeast, has already secured major oil and copper mining concessions in Afghanistan, which is believed to have more than $1 trillion worth of minerals.
Xinhua provided few details about the visit.
"It is in line with the fundamental interests of the two peoples for China and Afghanistan to strengthen a strategic and co-operative partnership ... conducive to regional peace, stability and development," Zhou said, according to the report.
Zhou, a member of the elite Politburo Standing Committee of China's ruling Communist Party, has overseen a crackdown on unrest in his nation's Muslim-populated Xinjiang region, which borders Afghanistan.
Zhou's appearance in Kabul comes after Karzai pledged to work with China to fight "terrorism and extremism" in the region during a visit to Beijing in June, where he attended the Shanghai Co-operation Organisation meeting.
The grouping, which is led by China and Russia and was set up to counterbalance US and NATO influence, granted Afghanistan observer status at the meeting.