The final UK troops were airlifted from Kabul on Saturday night drawing to a close Britain’s 20-year engagement in Afghanistan
In a video posted on Twitter on Sunday morning the prime minister told families: “Your suffering and your hardship were not in vain.”
He added: “It was no accident that there’s been no terrorist attack launched against Britain or any other western country from Afghanistan in the last 20 years.
“It was thanks to the bravery of our Armed Forces who fought to knock out (Osama) Bin Laden’s networks.
“And, thanks to the devotion of British troops and aid workers and diplomats and others, we’ve helped educate 3.6 million girls.
“Whatever the future may hold for Afghanistan, they will have that gift for the rest of their lives, a gift they will pass on to their daughters as well as their sons.”