Its author is unknown, but the first known performance of the song came in 1745 in support of [George II]? after a defeat by the Jacobite claimant to the British throne, Charles Edward Stuart, who had widespread Scottish support. This support caused the later attachment of a fourth verse. This verse has an anti-Scottish sentiment, and is rarely (if ever) sung nowadays.
Frequently, when an anthem is needed for one of the component countries of the UK -- at an international sporting event, for instance -- an alternate song is used: for Wales this tends to be Hen Wlad Fy Nhadau; Scotland uses either [Flower of Scotland]? or [Scotland the Brave]?; England often uses Jerusalem.
God Save the Queen was the very first national anthem, and its tune was adopted for several other countries' national anthems, including that of Liechtenstein, as well as the popular United States song [My Country, Tis of Thee]?.
God Save the Queen
God save our gracious Queen,
Long live our noble Queen,
God save the Queen:
Send her victorious,
Happy and glorious,
Long to reign over us:
God save the Queen.
O Lord, our God, arise,
Scatter thine enemies,
And make them fall:
Confound their politics,
Frustrate their knavish tricks,
On thee our hopes we fix:
God save us all.
Thy choicest gifts in store,
On her be pleased to pour;
Long may she reign:
May she defend our laws,
And ever give us cause
To sing with heart and voice
God save the Queen.
God grant that [Marshall Wade]?,
May by thy mighty aid,
victory bring,
May he sedition hush,
and like a torrent rush,
Rebellious Scots to crush
God save the Queen.