National service of thanksgiving
A national service of thanksgiving in the United Kingdom is an act of Christian worship, generally attended by the British monarch, Great Officers of State and Ministers of the Crown, which celebrates an event of national importance, originally to give thanks for victory in battle but later for occasions such as a royal jubilee, a royal wedding anniversary, or the end of a conflict. These services are usually held at St Paul's Cathedral in the City of London. History

In the Middle Ages, services of this kind were held in one of the Chapels Royal and were attended only by the members royal court, while members of the House of Lords simultaneously went to Westminster Abbey and the House of Commons, to St Margaret's, Westminster, for their respective thanksgiving services. However, in 1588, Queen Elizabeth I marked the defeat of the Spanish Armada by processing in a Roman-style chariot from Somerset House to Old St Paul's for a service of public thanksgiving. On her route, the queen entered the City of London at Temple Bar, where she was met by the Lord Mayor and Aldermen, and was offered the sword of the City as a sign of fealty, a tradition which has been maintained to the present. During the service, the queen was seated in a royal box in the north aisle, from where she could hear the sermon which was preached just outside at St Paul's Cross to a huge crowd. The custom was revived by Queen Anne in 1702 to give thanks for victory at the Battle of Vigo Bay at the newly rebuilt cathedral. As with the Armada thanksgiving, the service was preceded by a large cavalcade, which combined with the location at St Paul's, one of Europe's largest churches and England's first new-built Protestant cathedral, served to emphasise national power and unity. Rather than being concealed in a royal box, the queen was seated centrally on a raised dais. Six more of these services took place, celebrating various successes in the War of the Spanish Succession, but after 1708, Queen Anne preferred to attend thanksgivings at the Chapel Royal of St James's Palace, perhaps because of her ill-health or political considerations. However she did attend perhaps the grandest of these services in 1713 which celebrated the end of the war by the Peace of Utrecht. George Frederick Handel was commissioned to compose a Te Deum for the event, the first departure from the custom that music for royal occasions should be written by the musicians of the Chapel Royal. Early in 1789, King George III unexpectedly recovered from a debilitating illness which had plunged the country into a constitutional crisis. George himself suggested that a thanksgiving service be held at St Paul's on St George's Day, 23 April. The short length of time available for preparation was exacerbated by the fact that nobody in office could remember the previous event in Anne's reign, 74 years earlier, and a hasty search of the archives was ordered. The royal dias used by Anne was brought out of storage and renovated. Initially, the prime minister, William Pitt the Elder, was opposed to a procession from St James's Palace for fear of anti-monarchist demonstrations, but on the day, an "immense" crowd cheered the king enthusiastically. The four-hour service started with 5,000 children from London's charity schools, seated in specially built stands under the dome, singing Psalm 100; apparently an innovation suggested by Queen Charlotte. A further thanksgiving service at St Paul's was arranged to celebrate George's Golden Jubilee on accession day, 25 October 1809, but the ailing king decided to attend a private service at St George's Chapel, Windsor instead; the St Paul's service  was attended by the Lord Mayor and Corporation of London, who were nevertheless cheered by large crowds. At the start of the 1870s, there was an upsurge of republicanism in the United Kingdom. This was fuelled by a number of factors; Queen Victoria's neglect of public duties due to her extended mourning for Albert, Prince Consort, the wayward behaviour of Edward, Prince of Wales and finally a dispute about the large dowry allotted to Victoria, Princess Royal from public funds; all of this against the background of the Paris Commune. The recovery of Edward from a bout of typhoid fever was seized upon by the prime minister, William Gladstone, as an opportunity to improve the image of the royal family, and the queen and prince reluctantly agreed to a thanksgiving service at St Paul's. The service and carriage procession from Buckingham Palace was a resounding success, to the surprise of the queen who wrote that she had been "deeply touched and gratified... by the immense enthusiasm and affection exhibited". This was later considered to be a turning point in the fortunes of the British monarchy, and republican sentiment was marginalised for many decades. However, as Victoria's Golden Jubilee approached, the queen made it clear to her new prime minister Lord Salisbury, that she intended to have a more modest service at Westminster Abbey, to which Salisbury, with an eye on expenditure, was happy to agree. Victoria's Diamond Jubilee in 1897 was of a different order. Conceived by Colonial Secretary Joseph Chamberlain to be a great imperial extravaganza, the  driving force behind the event was Reginald Brett (later Viscount Esher), the  permanent secretary to the Office of Works. A return to St Paul's allowed for a grand procession through the capital, however it was found that the elderly queen would be unable to manage the steps of the cathedral. A proposal to manhandle the royal carriage into the church were discarded in favour of holding a short service outside the west front. The clergy, choir and important guests were arrayed on the cathedral steps, while the queen remained seated in her carriage. Despite her debility, the queen endured a lengthy carriage ride which on its return, crossed London Bridge and passed through the deprived district of Southwark. Thanksgiving services have remained popular spectacles; the 1977 Silver Jubilee of Elizabeth  II attracted an estimated crowd of one million spectators along the route of the procession, in which the queen rode in the Gold State Coach, while the British television audience for the 2012 Diamond Jubilee service was 4.5 million viewers for the BBC alone, the event was also broadcast by ITV News and Sky News. Liturgy
The liturgy of services in London are conducted by the Church of England and follow the format of the Anglican Daily Office from the Book of Common Prayer. They usually include the singing of the Te Deum, a canticle which has traditionally been used in Western Christianity for national rejoicing. The service may also include a Psalm, an anthem, readings from the Bible and a sermon. Services in Edinburgh are under the auspices of the Church of Scotland. Although these services are conducted by the established churches in England and Scotland, efforts towards the inclusion of other Christian denominations and other faiths started for the thanksgiving service in 1872 when invitations were sent to representatives of the Nonconformist churches, Cardinal Manning, the Catholic Archbishop of Westminster and Hermann Adler, the Chief Rabbi. Recent developments have included the active participation of faiths and beliefs other than Christianity; at the 2023 Honours of Scotland service in Edinburgh, blessings and statements of affirmation were made by representatives of Islam, Hinduism, Judaism, Tibetan Buddhism and Humanism. List of national thanksgiving services
All took place in St Paul's Cathedral unless otherwise noted. References

Sources

St Paul's Cathedral
British monarchy
Anglican liturgy