Gordon Brown saluted the courage of British armed forces who served during the Troubles at a service honouring those he said "helped create conditions for the peace Northern Ireland now enjoys".
Lady Thatcher, whose entire prime ministerial career was played out against the
backdrop of the Troubles, was dressed in sombre tones.
Soldiers lined up to honour the work of more than 300,000 military personnel who served in Operation Banner in Northern Ireland between 1969 and 2007.
Prince Charles, joined by his wife, the Duchess of Cornwall, described how events in Northern Ireland had affected his own family. His great uncle, Lord
Mountbatten, was killed by a terrorist bomb in 1979.
Conservative leader David Cameron was among the guests at
the service at St Paul's Cathedral in London.
The 38-year military campaign in Northern Ireland was conducted under several prime ministers including Tony Blair and Lady Thatcher, who joined Gordon Brown at the service.
Defence Secretary Des Browne attended the service where the Bishop of London praised the military campaign that helped keep the "forces of chaos at bay".
After the service, around 700 veterans marched from the cathedral to the Guildhall for a reception hosted by the Prince of Wales.
The Prince of Wales saluted veterans during a march past as those present remembered the 763 servicemen and women who died serving in the province.
The Duchess of Cornwall was pictured saving her hat from a gust of wind after joining more than 2,000 of those veterans who served with the Royal Navy, Army and Air Force.