Why God Save The King And My Country 'Tis Of Thee Have The Same Tune
The British national anthem is unique among some other national anthems in that its lyrics are variable depending upon the situation. Specifically, when a queen is on the throne, it's called "God Save The Queen," and feminine pronouns (such as "send her victorious") are used throughout. When a king is on the throne — for example, the current King Charles III — it's called "God Save The King" and uses masculine pronouns.
And although American schoolchildren are unlikely to ever be put upon to sing the British national anthem specifically, they've been singing the song, albeit with different lyrics, for a couple of centuries now. That's because "My Country 'Tis of Thee" — which isn't the official national anthem here but is one of many patriotic songs we all learn as kids — has exactly the same melody, according to the Library of Congress. If this sounds like an example of upstart colonists taking something from their colonial masters and making it their own in order to troll the Crown, that's because that's exactly what happened. Sort of. The truth about why "My Country 'Tis of Thee" and "God Save The King" are the same melody is a hair more complicated.
Musical Fan Fiction
According to History Today, it's not clear when the melody to "God Save The King" was written, but the Library of Congress points to a possible origin in the 17th century. Nevertheless, the song exploded (in England, anyway) in 1745. That the melody worked as a national anthem was not lost on the Danish, who used it as a basis for theirs by 1790.
It's not clear how or when the melody made its way across the pond, but get there it did, and soon enough, an American was setting his own words to the music. Not a big deal, because at the time, copyright enforcement was minimal, if not nonexistent; further, there was precedent for other countries using the song, considering the Danish had also made it their own. As Ben's Guide to the U.S. Government notes, that American was Samuel Francis Smith, and he put pen to paper in 1831. A while later, children's choirs were singing it, and the rest, as they say, is history.
Whether or not Smith put patriotic American lyrics to a British song as a deliberate "screw you" to England or whether he simply liked the tune is unclear. Either way, the song is an extension of George Bernard Shaw's famous claim that the U.S. and U.K. are "two countries separated by a common language." Shaw could also have said that they are two countries separated by a common anthem.