Britain's 38-year military campaign to maintain security in Northern Ireland was praised yesterday for helping to keep the "forces of chaos at bay" by the Bishop of London.

Dr Richard Chartres paid tribute to the servicemen and women who took part in the Army's longest deployment for their ability to "stand firm" until peace could be achieved. The bishop's comments came as he delivered a sermon to a congregation which included Prime Minister Gordon Brown, former prime ministers Tony Blair and Margaret Thatcher, the Prince of Wales and Defence Secretary Des Browne - all commemorating the armed forces who served in Northern Ireland.

Before the commemoration ceremony at St Paul's Cathedral, Mr Brown issued a statement which also praised Britain's armed forces. He said: "They helped create conditions for the peace Northern Ireland now enjoys and today we salute their courage.

"It is in their honour and for all the people of Northern Ireland that all those committed to the province's future must work together to ensure a lasting peace."

The bishop told the congregation during the hour-long service: "Military intervention can hold the forces of chaos at bay while people learn again how communities with very different histories and aspirations can live together and do business with one another.

"Operation Banner kept that vital part to which a more hopeful future for Ulster could enter."

The commemoration service began with a fanfare of trumpeters.

Among the congregation were Conservative leader David Cameron, Air Chief Marshal Sir Jock Stirrup, chief of the general staff, and other high-ranking military officers.

Prince Charles, who was joined by his wife, the Duchess of Cornwall, said: "It is vital that we, as a nation, remember all those who have made the ultimate sacrifice in bringing greater peace and security in Northern Ireland."