Wootton Bassett is the first town in a hundred years to be awarded the “Royal” accolade in recognition of its role in honouring the UK’s military personnel.
The Prime Minister David Cameron confirmed the Queen agreed to the tribute as “an enduring symbol of the nation’s admiration” for the town.
The Princess Royal delivered the Letters Patent on behalf of the Queen making the Wiltshire town Royal Wootton Bassett.
Princess Anne told those assembled in the town’s High Street, which has become synonymous with the repatriation of fallen servicemen and women, that they had “set an example that others wanted to follow”.
She said: “This community has come together in the most extraordinary way.”
The former defence secretary Dr Liam Fox had been due to attend but following his resignation, the armed forces’ delegation was headed by Sir Peter Wall, the chief of the general staff.
The decision to award the town with the royal prefix was the Queen’s following a petition from Mr Cameron.
The town became famous as thousands of people began to turn out to pay their respects to the fallen service men and women who died in Iraq and Afghanistan who had been repatriated at nearby RAF Lyneham, starting in April 2007.
Wootton Bassett’s role ceased at the end of August when the base for repatriations moved to RAF Brize Norton with the town of Carterton taking over as the place for grieving families and members of the public to pay their respects.
The commemoration included parades by representatives from the armed forces, accompanied by the Wootton Bassett Band.
The Band of Her Majesty’s Royal Marines, Collingwood, took part marching to a piece of music entitled Wootton Bassett, written by Captain Pete Curtis, a Royal Marines director of music.
Following speeches, the flag bearer broke the new Royal Wootton Bassett flag, a ceremonial and historic moment when the new flag is raised for the first time.
The town was also given a new coat of arms, as flypasts from a Globemaster, a Hercules and a Vulcan bomber were seen overhead.
The town marked the event by installing new road signs, commissioning a tea towel and running a baking competition to create a special bun to be known as the Bassett Crown.