The work was written in the midst of the Jacobite rising of 1745–1746, the attempt to overthrow Handel's patrons – the Hanoverian monarchy under George II – and replace them with a Stuart restoration under Charles Edward Stuart, "Bonnie Prince Charlie".
The fighting was at a hiatus due to winter weather and the Duke of Cumberland was in London in February 1746.
[2] Handel composed the Occasional Oratorio hastily in January and February 1746, borrowing and re-arranging some movements from previous compositions, and premiered it immediately on 14 February 1746 with Willem de Fesch, Élisabeth Duparc, Elisabetta de Gambarini, John Beard, and Thomas Reinhold at Covent Garden Theatre.
[3] The famous chorus "Prepare the Hymn" (a paraphrase of Psalm 81:1-2) is the 26th movement and appears in the second part as 2.10.
[4] Handel's coronation anthem Zadok the Priest was also reused as the finale to the oratorio, but without the second movement "And all the people rejoic'd".