The hearse arrives at Wellington Barracks in London
Hundreds of people have attended the funeral of the most senior British army officer to die in action since the Falklands War.
Lt Col Rupert Thorneloe, 39, from Kirtlington, Oxford, was the commanding officer of the 1st Battalion Welsh Guards, based at Aldershot, Hampshire.
He was killed in an explosion in Helmand province in Afghanistan on 1 July with Trooper Joshua Hammond, 18.
Prince Charles was among those at the service in central London.
The prince, who was a friend of Col Thorneloe, had a private meeting with the soldier's family before the service.
Col Thorneloe's hearse passed through Aldershot Barracks, lined with Guardsmen, at about 1100 BST.
Robert Hall, BBC News, in Aldershot
Outside the gate of Lille Barracks, a line of bouquets caught the morning sunshine. The cards, all from local people, spoke of a 'hero" who would be sorely missed.
Inside the barracks, along tree lined avenues, young soldiers marched into position. These were the Welsh Guards of the rear party, the few who had not travelled to Afghanistan, today they'd share their farewell with colleagues from the Coldstream and Irish Guards.
Outside the building which had been his office, the cortege moved off at walking pace. Beside the hearse, the man of the bearer party marched, ramrod straight; only the sound of their boots breaking the silence.
Ahead, cooks, and civilian staff stood among the guardsmen to bow their heads in tribute; they too were part of the regimental family of which Rupert Thorneloe had been so proud.
It's a long held tradition to bid farewell to a commanding officer who is moving on; today that tradition was painful for all concerned.
At the gate sunlight flashed from the bayonets of the final honour guard, as rifles were lowered in salute; a man who was spoken of as a 'born soldier' had begun his final journey.
It was taken to the Guards Chapel at the Wellington Barracks, where a service began at 1245 BST.
Eight standard bearers from the Welsh Guards lowered their flags in tribute as the hearse was driven into the grounds of the chapel.
Eight Welsh Guards soldiers, making up the bearing party, then shouldered the coffin and carried it into the chapel as Col Thorneloe's family watched.
On top of the coffin were the 39-year-old father-of-two's sword, his scabbard, forage cap, Sam Browne belt and medals.
A wreath of white roses was also laid on top of the coffin.
Afterwards, a private service of internment was being held.
Col Thorneloe and Trooper Hammond, from Plymouth in Devon, of 2nd Royal Tank Regiment, were travelling as part of a resupply convoy when a bomb blew up their armoured vehicle.
Six other soldiers were injured in the blast near Lashkar Gah as UK and US troops started a major offensive against Taliban militants in southern Afghanistan.
The service, at the Guards Chapel at London's Wellington Barracks, in Birdcage Walk, heard tributes from former defence secretary Des Browne, who also knew the officer, and Col Thorneloe's father, Major John Thorneloe.
Mr Browne praised Col Thorneloe for his "unquestioned loyalty, his absolute integrity and his magnificent commitment to what we were doing".
Then speaking directly to his widow Sally, he reflected on the toll such a job can take on family life.
Lt Col Thorneloe was described as an "outstanding commanding officer"
He said: "As you know more than anyone he was first in and he was last out, he never left the office until the work was finished."
Speaking before the ceremony, Major Dai Bevan paid tribute to his comrade.
He said: "Col Thorneloe was an exceptionally inspirational man who always led from the front."
Col Thorneloe and Trooper Hammond's bodies were flown to RAF Lyneham on 6 July where a private memorial was held before the coffins passed through Wootton Bassett.
Col Thorneloe was the most senior British army officer to be killed in action since Lt Col Herbert "H" Jones died at Goose Green on the Falklands on 28 May 1982.
Since 2001, a total of 184 UK service personnel have died in Afghanistan.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.