The family of Gary Thompson were among those at the service
The Princess Royal has unveiled a memorial to the armed forces which commemorates the 16,000 servicemen and women killed since World War II.
The memorial is in the south cloister of Westminster Abbey, and takes the form of a metal plaque.
It was created to remember those who have died in conflict since 1945.
It commemorates regular and reserve forces, as well as the Royal Fleet Auxiliary and the Merchant Navy members killed in support of the armed forces.
Princess Anne told those at the service that the purpose of the memorial was "to remember the sacrifice and heroism in defence of freedom of the men and women who have lost their lives in conflict".
After unveiling the plaque, she met the family of senior aircraftman Gary Thompson - the oldest British serviceman to die in Afghanistan when he was killed in April, aged 51.
His widow, Jacqui, and their five teenage daughters were among those at the service at Westminster Abbey.
Kelly Thompson, 17, said it was important to have a memorial for those who died while serving in the armed forces.
She said: "They made such great sacrifices for our country and I think they deserve the honour of being remembered for what they've done because it is for us."
Princess Anne unveiled the memorial at Westminster Abbey
The princess spoke to the family after the service.
She congratulated Kelly on a reading she did and told her: "It isn't an easy thing to do."
They were joined by defence ministers and chiefs and 400 service personnel who have served in Iraq and Afghanistan with the armed forces.
The plaque is made of steel, with a covering of earth gathered from 15 different battlefields around the world.
It reads: "Remember the men and women of the Armed and Auxiliary Forces who lost their lives in times and places of conflict since the Second World War."
It is part of the National Armed Forces Memorial, which also includes the National Remembrance Arboretum near Lichfield, Staffs. That was opened by the Queen in October last year.
The plaque's artist, Tom Phillips, says the soil from foreign fields is meant as a conscious echo of the poet Rupert Brooke's sonnet The Soldier.
He told the BBC: "It is an emblem of military action. It looks simple but is quite complicated.
"When I started there were more than 15,000 dead but that had risen to 16,000 by the time I was finished."
The words of the dedication inscribed on it have been allowed to rust and made deliberately difficult to read in order to encourage people to spend time thinking about those who died.