Media playback is unsupported on your device Media caption Gen Joseph Dunford: "Eventually this war has to be resolved by political means"

The commander of international forces in Afghanistan has warned the international community not to turn its back on Afghanistan.

Gen Joseph Dunford told the BBC democratic progress could be threatened by the end of international combat operations in Afghanistan in 2014.

He said talks with the Taliban would be essential, sooner or later.

And without continued support from foreign politicians, he said citizens' basic rights were in no way guaranteed.

Gen Dunford is the last commander of Nato's International Security Assistance Force (Isaf), and is expected to remain in the post until the end of next year, when Nato combat troops are scheduled to leave.

'Complex insurgency'

Speaking to the BBC in Kunduz, in the north of the country, he said: "At this point we have made significant progress, but we are not yet at the point where it is completely sustainable."

Analysis What sounds like a downbeat assessment is designed to remind politicians outside Afghanistan not to abandon the country at the end of 2014. The last commander of the Isaf mission revealed that when combat troops left, there would still be five main bases for international troops in Afghanistan. Groups fighting alongside the Taliban include the Haqqani network, the Islamic Movement of Uzbekistan and a mixture of criminal and drugs gangs. There has been a major shift, in the last few years, concerning the Taliban and a growing awareness that talks are essential. General Dunford had this message for the Taliban: "To the degree that they have any kind of political space to accommodate with the Afghan people, now would be the time."

"That really is the focus of effort over the next 18 months. That's why we need to start now - especially with the Afghan security forces - to talk about 2018, not 2014. That period of time will allow these gains to be sustainable."

Next week, the last districts in the country will be handed over to full Afghan government control, with some international troops remaining in a supporting role.

Gen Dunford said Afghan forces were "getting good enough" to fight the conflict, but stressed that talking to the Taliban was critical for the country's future.

They were not the only enemy, and many criminal groups had joined the complex insurgency, he added.

The warning comes amid a fresh wave of violence in Afghanistan, believed to have been carried out by the Taliban.

On Tuesday, a suicide bomb attack in Kabul killed at least 16 people and injured more than 40 others outside the Supreme Court.

The previous day, seven insurgents, including suicide bombers, laid siege to the city's main airport for four hours before they were killed.

The BBC's David Loyn, in Afghanistan, says the group appear to be demonstrating that they can still hit high-profile targets, despite a heightened alert in the run-up to the security handover.