Image caption The number of UK military deaths in Afghanistan since 2001 is now 414

A small number of British soldiers could remain in Afghanistan after forces withdraw in 2014, a senior government official has said.

The official made the disclosure ahead of a Nato summit in Chicago, which is expected to focus on Afghanistan.

David Cameron has set a deadline of the end of December 2014 for Britain to stop all of its combat operations.

But it is understood that up to 200 members of the UK's special forces could stay on to help combat terrorism.

British troops have been in Afghanistan since the US-led invasion in 2001.

Britain plans to withdraw 500 soldiers from its 9,500-strong force this year, with Afghan security forces due to take over responsibility for security by the end of 2014.

'Protect ourselves'

The official said: "As we've said previously, British forces will not remain in a combat role in Afghanistan beyond 2014.

"The majority of forces that remain in Afghanistan will be in a training and mentoring role, for example at the Afghan Officer National Training Academy.

Analysis Here in Chicago, Nato is keen to show the world that its members stand united on Afghanistan, even as some withdraw rather sooner than the rest, and that Nato itself remains a formidable security alliance, despite serious cuts to many of its members' defence budgets. The crucial talks will centre on how to execute a credible exit strategy and get Nato combat troops out of Afghanistan while strengthening the Afghans' own ability to ensure security after 2014. Key to that will be getting enough promises of funding to reassure Afghanistan that it will not be abandoned: the bill will be some $4bn a year to pay for security forces in the coming years. The US remains keen for other members to pay their way, both in Afghanistan, and within Nato itself in terms of equipment, troops and commitment to collective defence. The focus in other discussions here will be on what kind of mission should remain in Afghanistan after Nato combat troops depart. What's decided in Chicago this Sunday and Monday will be as much about appearance as reality. Nato leaders want to send out a clear message of financial and political support for Afghanistan for the years after 2014, not least so that the manner of Nato's exit doesn't tarnish the alliance itself or the many sacrifices made over the past decade on Afghan soil.

"But I wouldn't rule out a small number of forces playing a counter-terrorism role if needed.

"This would be in keeping with how we are working to protect ourselves from the counter terrorism threat emanating from other parts of the world, such as the Arabian Peninsula."

Last month, Defence Secretary Philip Hammond said the UK would fund Afghan security forces after British combat operations in their country cease.

He said the UK would give £70m a year to a £4bn international fund to stop Afghanistan once again becoming a "safe haven" for terrorists.

The first £70m payment would be made in 2015, he said.

Contributions from other countries are expected to be announced at the Nato summit, which will set out the international community's commitments on security support to Afghanistan after the withdrawal date.

Nato Secretary General Anders Fogh Rasmussen told the BBC: "We are in a process of gradually handing over lead responsibility for security to the Afghans and that process will be complete by the end of 2014.

"During that process you will see withdrawals of troops, you will see a gradual change of the role of our troops from combat to support.

"It's not in contradiction with our strategy, it's a part of our strategy."

The summit will also consider the future role of Nato itself as economic austerity forces governments to tighten on defence spending.

Mr Cameron is expected to argue that reduced spending on armed forces must not mean any lowering of Nato's ambition, and that it must continue to be prepared to tackle threats beyond its borders.