The event – which was broadcast on BBC One at 21:00 – was hosted by actress Hannah Waddingham and featured performances by musicians including Sir Rod Stewart and Sam Ryder.
Several armed forces bands were also set to take to the stage to accompany the artists and perform military music, including the RAF Squadronaires.
Veterans in attendance included some who had helped to plan D-Day – when Allied troops landed on the beaches of Normandy, marking the start of the campaign to liberate north-west Europe during World War Two – and some who had been prisoners of war.
Members of the LGBTQ+ veterans charity Fighting With Pride were also present, including former PO Alex Rasmussen from Bournemouth, who was made to leave the Royal Navy in 1996 after colleagues discovered his sexuality.
The King attended his first official engagement in support of the community in October, as he unveiled a memorial to lesbian, gay, bisexual and transgender military personnel.