Five British nationals being held by the Taliban in Afghanistan have been released, with the UK Foreign Office admitting it had been a "mistake" for them to go to the country against official travel advice.
Foreign Secretary Liz Truss said she is pleased the five would soon be reunited with their families.
The Foreign Office said the government "regrets this episode".
"We welcome and appreciate the release by the current administration of Afghanistan of five British nationals who were detained in Afghanistan," a Foreign Office spokesman said.
"These British nationals had no role in the UK government's work in Afghanistan and travelled to Afghanistan against the UK government's travel advice. This was a mistake.
"On behalf of the families of the British nationals, we express their apologies for any breach of Afghan culture, customs or laws, and offer their assurance of future good conduct.
"The UK government regrets this episode."
The Foreign Office would not confirm details about the five people who were detained.
But one Briton known to have been held in Afghanistan and who has now been freed is Peter Jouvenal, a TV cameraman and businessman.
Mr Jouvenal, a British/German dual national, was held since early December and had been visiting the country for business and family reasons, his friends said.
A Change.org petition that had been calling for his release said: "It has been an arduous time for the captives, and many people from around the world have joined this campaign to mark their solidarity.
"I know that your signatures meant a lot to Peter's wife, Hassina, and his three daughters, bolstering their spirits on the many dark days they have had without Peter."
Adam Kelliher, who started the campaign, said they were "not privy to the exact details of the terms under which the five were freed".
He continued: "I must pay homage to Hassina, for whom Richard Parry and I have the deepest admiration. She did everything in her power to try to get her husband home and deftly navigated a political minefield.
"It will no doubt take a lot of time for these five men to decompress and process what they have been through. But they will be back where they should be, with their families, and those who matter to them.
"Welcome home chaps!"