Media playback is unsupported on your device Media caption Watch: Was God Save the Queen played at John McCain's funeral?

British eyebrows may have been raised during Senator John McCain's funeral when the familiar notes of God Save The Queen were heard.

The anthem of the departed colonial power might seem an odd choice to be played at the memorial for the Vietnam War hero, who died last week from cancer at 81.

So why was it played? Actually, it wasn't.

In short: it was not the British national anthem but My Country Tis of Thee, a US song from 1832 featuring the same melody.

The tune has a long history.

Beethoven, Haydn and Brahms were among the scores of composers to have used the notes in some of their own compositions.

The melody was also used as the national anthem of Prussia and is still heard in Liechtenstein.

Yet the origins remain a mystery.

The son of British composer Henry Carey claimed his father wrote it in London in 1740.

But some music historians argue it was based on a still earlier tune, with English composer John Bull, the French court composer Jean-Baptiste Lully and a military hymn from Switzerland all mooted as the source.

According to the Library of Congress, first US president George Washington was greeted with the tune at his inauguration in 1789. The lyrics that day were:

Hail, thou auspicious day!

For let America

Thy praise resound.

Joy to our native land!

Let every heart expand,

For Washington's at hand,

With glory crowned.