David Cameron has declared the mission in Afghanistan will have been accomplished by the time all British troops have been withdrawn at the end of next year despite fears of a surge of violence from the Taliban around next year's elections.

The prime minister made the bold claim – with echoes of President George Bush's hubristic triumphalism over the Iraq war – as he visited Camp Bastion, the British base in Helmand province, almost exactly a year before all UK fighting troops are due to be withdrawn from the country.

About 6,000 men and women are still serving in Afghanistan in a war that has cost 446 British lives so far.

Asked whether they were coming home with mission accomplished, Cameron said: "Yes I think they do. I think they can come home with their heads held high. You know, we will not leave behind a perfect country or a perfect democracy.

"You have to remember that Afghanistan is an extremely poor country with a very, very troubled history but I think the purpose of our mission was always to build an Afghanistan and Afghan security forces that were capable of maintaining a basic level of security so this country never again became a haven for terrorist training camps.

"That has been the most important part of the mission … The absolute driving part of the mission is the basic level of security so that it doesn't become a haven for terror.

Cameron eats dinner with troops. Photograph: Lefteris Pitarakis/AP

"That is the mission, that was the mission and I think we will have accomplished that mission and so our troops can be very proud of what they have done." Throughout the year, the UK military will gradually hand over to the 350,000-strong Afghan forces to keep the Taliban insurgents at bay, despite worries over whether the relatively new army and police forces have enough training and equipment to deal with the threat.

It is understood there are particular worries about a surge in violence around the election on 5 April next year, when the long-term president, Hamid Karzai, will hand over to a new leader. The British military is braced for a heightened threat as the Taliban is likely to use this event to mount a campaign against politicians and election observers, with increased risk of assassinations and a slide backwards into violence.

A senior British source said: "The insurgency will have a go. They will still be having goes next year at GIRoA [government of the Islamic Republic of Afghanistan] officials and at electoral officials but against the very credible and capable Afghan national security force. At the moment the insurgency are just trying to regenerate and reorganise for the next phase."

However, the source stressed that the "summary of where we're at in Helmand is overwhelmingly positive". He said: "The campaign here is on track and the Afghans are in a good place in the short, medium and long term."

Cameron also emphasised that Afghan forces would have lead responsibility for peacekeeping during the elections and insisted Britain would stick to the deadline of bringing out all fighting troops by the end of the year whatever happens.

Cameron's mission accomplished claim drew criticism from Labour as well as some former diplomats who pointed out that the purpose of the mission has frequently changed from removing Al Qaida's bases, eradicating poppy cultivation, educating girls and helping forge a form of democracy.

Cameron arriving at Camp Bastion. Photograph: Lefteris Pitarakis/AP

William Paytey, UK ambassador to Kabul from 2010-2012, said: "It was an unfortunate use of language because it creates expectations. This is not Iraq. 'Mission Accomplished' suggests that somehow at the end of 2014 that is the end of the story whereas it is actually a way point. Afghanistan has got a long way to go and it could be many decades before we see real peace there."

The shadow defence secretary, Vernon Coake, said: "David Cameron should have chosen his words more carefully.

"We can be proud of the contribution that Britain's Armed Forces have made and are making in Afghanistan. But the mission is ongoing and our troops will be on the frontline until well in to next year. However, there have been tensions between the Afghan government and the US over how much of a military presence will remain in the country after the end of this year".

Richard Ottaway, chairman of foreign affairs select committee, defended the prime minister: "I think what David Cameron is making perfectly clear is that we went there to rid Afghanistan of Al-Qaida, that has been done; we went there to build capacity to put in police, to put in security forces and to train them, that is job done. So what I think is that we went there for a purpose and we've achieved that purpose".

• This article was amended on 16 December 2013 to correct the number of British fatalities in Afghanistan from 646 to 446.