The last UK combat troops have left Afghanistan, as polls suggest more than half of UK and US respondents do not think the operation was "worthwhile".
The end of British combat operations was announced on Sunday with Camp Bastion handed over to Afghan control. The final UK troops left on Monday.
PM David Cameron said Britain should be "incredibly proud".
The BBC telephone poll of 1,000 UK adults, carried out from 24-26 October, found 42% thought Britain was "less safe" as a result of the 13-year campaign.
Responses showed 14% thought the UK was safer as a result of the international intervention in Afghanistan, and 39% thought there was "no real difference".
The telephone poll in the US surveyed 1,002 adults. Asked the same question about whether or not their country was safer, 28% said it was, while 25% said it was "less safe".
The largest percentage in the US, 43%, felt there was no difference.
In the UK, 24% said they thought Britain's involvement was worthwhile, while in the US, 45% said their own involvement was worthwhile.
In addition, 24% in the UK said the deployment of troops had left Afghanistan "better off", 25% said the country was "worse off" and 44% said there was no real difference.
BBC opinion poll UK questions
The US poll found that 34% thought Afghanistan was "better off", with 20% saying it was "worse off" and 43% saying there was no real difference.
In answer to another question, 31% in the UK said they were somewhat or very confident Afghanistan could "protect its citizens without the help of UK forces", while 64% said they were not so confident or not confident at all.
In the US, 31% also said they were confident of that, with 66% not confident.
The final UK troops left by air, with the last holding the union jack.
The government has said they will not return to fight in Afghanistan "under any circumstances".
The UK's most senior officer in Helmand, Brig Rob Thomson, said: "We can be proud of what we have achieved here. There is no doubt that we have contributed to a brighter future for Afghanistan."
Mr Cameron said: "When al-Qaeda attacked the twin towers in 2001, they planned that attack from Afghanistan, operating freely under the Taliban regime.
"Our incredible servicemen and women have driven al-Qaeda out and they have built up and trained the Afghan forces, none of which even existed in 2001, so that the Afghans can take control of their own security."
He added: "We should be incredibly proud of all they have done to keep our country safe."
By Jonathan Beale, BBC defence correspondent
The last UK forces in Camp Bastion began their pull-out in the early hours of Monday morning.
Once their main base in Helmand housing thousands of troops, it was, in the final hours, occupied by just a few hundred UK soldiers and US marines.
It was a carefully rehearsed manoeuvre that had taken months to plan.
As British forces left their watchtowers they were replaced by Afghan soldiers who will now be left to guard Bastion and fight the Taliban on their own.
At just before midday the final wave of UK and US helicopters took off.
In less than an hour they had landed back in Kandahar, their final staging post before the long journey home.
The last UK commander in Helmand, Brig Rob Thomson, expressed his pride and relief when they'd all arrived safely.
It marks not just the end of their mission but the end of Britain's 13-year war in Afghanistan - and British forces have been told they will not be returning.
Defence Secretary Michael Fallon told the BBC that troops were coming home with their "heads held high", having helped make Afghanistan a "much better place".
He said the country was no longer a "safe haven" for extremist group al-Qaeda and Afghans now had a "chance of a better future".
He said there was "no guarantee" Afghanistan would "be safe and stable forever", but the Afghan government now had 300,000 soldiers and police officers.
Asked if the Afghan army might collapse, as parts of the Iraqi army did in the face of Islamic State militants, Mr Fallon said Iraq's forces were "seen as sectarian" while the Afghan army had the "support of the whole population".
He said the UK was not "walking away entirely" and would continue to give help and support, including financial aid and military training.
The Taliban insurgency continues, and Afghan police said four of its officers had been killed and at least 10 were taken hostage when militants attacked a compound in the northern Badakhshan Province on Sunday.
Elsewhere, Maj Gen Richard Nugee, one of Britain's highest-ranking commanders in Afghanistan, said Afghan forces had proved they could "hold their ground" and defeat the Taliban.
At the scene
Robert Hall in Royal Wootton Bassett
It's a busy Monday on Wootton Bassett High Street, but pride in the past burns brightly here.
More than three years after the last repatriation cortege passed through, residents still talk of the days when the town fell silent and the bell tolled for the fallen.
Town councillor Chris Wannall told me there was never any formal organisation, just a spontaneous desire to show support, which drew thousands from every corner of the UK.
Today, this is Royal Wootton Bassett, but this community never sought honour or media attention. Just the quiet satisfaction that it had done its duty.
Asked about the UK's 13-year military operation, he added: "Was it worth it? It's always difficult to say for those who have lost people here, but actually this country is a far better place and I believe we're safer in Britain."
General Sir Mike Jackson, former Chief of the General Staff of the British army, told BBC News that Afghanistan "without doubt is a better place than it was in the aftermath of 9/11."
He added: "Things are not perfect, of course, and there is a security problem, which has not yet been resolved, but I am not going to stand here and say I don't believe Afghanistan is not the better for the blood and the treasure… that's been expended."
Labour leader Ed Miliband said: "All those who served did so to help ensure Afghanistan could no longer be used as a safe haven for terrorists."
But former Labour Deputy Prime Minister Lord Prescott has questioned whether the results "justified" the 453 UK deaths.
Writing in the Daily Mirror, Lord Prescott, who was in the cabinet that sent British troops to Afghanistan in 2001, said: "I respect the thousands of gallant men and women who went to Afghanistan and Iraq to save lives and restore peace.
"But they teach us that being the world's policeman carries a heavy price and does not justify the heavy loss of lives."
Ian Sadler, of the Military Families Support Group, said UK troops "could've come out a lot sooner".
Mr Sadler, whose son Jack was killed in Afghanistan in 2007, said Britain should not have tried to "construct a new nation" in Afghanistan, and UK forces should have left after driving al-Qaeda out of its training areas.
UK forces were part of a US-led coalition which toppled the ruling Taliban in 2001, following the 9/11 attacks in the US.
After 9/11, US President George W Bush demanded the Taliban hand over any leaders of al-Qaeda - the militant group which later claimed responsibility for the attacks - in Afghanistan, but the Taliban did not immediately comply.
Taliban leaders called for talks, but President Bush said there would be "no negotiations" and military action started on 7 October.
Camp Bastion, in Helmand province, was the UK's main Afghan base from 2006.
At the time it opened, the UK said its forces would be there to protect the reconstruction of the country, but they got caught up in the struggle against the Taliban.