The town of Wootton Bassett has held a special service to mark the end of military repatriations there.
The bodies of 345 service personnel have passed through the Wiltshire town in the past four years.
At 19:58 BST the townsfolk watched their union jack being lowered and blessed. It will be taken to RAF Brize Norton where repatriations will resume.
In recognition of its role in marking such flights, the town will be renamed Royal Wootton Bassett in the autumn.
More than 2,000 people lined the high street in the town to take part in the Sunset Service which started with the chiming of the bell at the Church of Saint Bartholomew.
The mayor then addressed the town and said the service was the "last full measure of devotion" to those who had died.
War veteran Peter Gray lowered the flag with his grandson. It will be laid on the altar in the church overnight before being symbolically presented to the people of Oxfordshire on Thursday.
The first service took place in April 2007 when the bodies of military personnel began arriving at the nearby RAF base at Lyneham.
'Best of British'
Then, it was a few members of the local branch of the Royal British Legion (RBL) bowing their heads as the funeral corteges passed.
Later, hundreds of residents turned out to pay their respects before the bodies were taken on to Oxford.
The last and 167th repatriation through Wootton Bassett took place on 18 August when the body of 24-year-old Lt Daniel Clack, of 1st Battalion The Rifles, was returned to the UK.
The town gradually became a focal point for those wishing to acknowledge the sacrifice of military personnel, and went on to attract international attention.
During Prime Minister David Cameron's first US visit, President Barack Obama said the townsfolk's solemn tributes marked "the best of British character".
Dr Peter Caddick-Adams, a military expert at Cranfield University, said Wootton Bassett had shown the nation it was at war.
"They've taught us the meaning of sacrifice, and I think we'd forgotten it," he said.
Speaking in 2009, the then mayor Steve Bucknell, said: "We've been careful throughout this process not to get involved in the politics of the war.
"These repatriations are simply about the soldiers and their families and the support we give to the armed forces."
During Wednesday's service, the union jack was lowered before being taken to a memorial garden at RAF Brize Norton in Oxfordshire where future repatriation flights will land.
'Gives us closure'
The mayor of Wootton Bassett Paul Heaphy, who will hand over the flag, said: "We felt it was appropriate to mark the passing of responsibility from Wootton Bassett to Oxfordshire and we felt it would be wrong not to recognise what has happened over the last number of years.
"We've had requests from the community to pull something together, so we have created this ceremony which hopefully people will feel fitting."
Anne Bevis, repatriation liaison officer with the RBL in Wootton Bassett, said: "The ceremony will bring closure to us, with the handing over to Brize Norton, it sort of ties it all up nicely and gives us closure, otherwise it is left high and dry."
The town of Carterton, near Brize Norton, is to continue the tradition started at Wootton Bassett with the creation of a special area where grieving families and local people can pay their respects.
The new repatriation centre is expected to be used for the first time when the body of Royal Marine Sgt Barry Weston, 40, of 42 Commando, who died on foot patrol in Helmand province, is flown home from Afghanistan.