The history of America's star-spangled theme tune

The US national anthem is sung at Barack Obama's inauguration
'O say can you see' ... Yesterday's inauguration ceremony in Washington DC. Photograph: Pat Benic/Pool/EPA

It was impossible not to be stirred by Barack Obama's inauguration yesterday, and the sense of change, hope and shared responsibility that he has inspired around the world. Perhaps the only fixed point in all presidential inauguration ceremonies, the one that remains constant no matter how different the speeches, the benedictions, the poems and the presidents, is the American national anthem, played yesterday by the United States Marine Band to conclude the whole event.

The anthem's origins are far removed from the spirit of tolerance and freedom that President Obama asked his listeners to live by. The words were originally an expression of American defiance against the British, a text composed by Francis Scott Key during the defence of Fort McHenry in September 1814.

And the tune? It's a British drinking song, Anacreon in Heaven, written by a presumably sozzled John Stafford Smith in 1771 as a signature tune for the boozers of the Anacreonic Society, a club on the Strand. By 1931, the Star-Spangled Banner, as it became with Key's words, was officially adopted as the US national anthem.

Strange things, national anthems: they are musical objects that are taken so much for granted that no one pays their words or their melodies much attention, yet they probably bear more musical and social meaning than any other tunes in the world (an idea that Karlheinz Stockhausen used as the starting point for his 1967 Hymnen, a melting together of many different national anthems into a heightened electronic soup).

Just like the country's flag, the anthem has meant any number of things since it became America's theme tune: from a rallying cry for anti-communist liberalism in the postwar years to a symbol of imperial misadventures and war-mongering in Vietnam and Iraq. Yesterday, the powerful singing of the millions on the National Mall suggested new resonances for the hoary old tune. John Stafford Smith would be amazed, but maybe his humble little song has become a symbol for a battered but renewed belief in liberty.

Update: Oh, not getting home for the start of the inauguration ceremony meant that I missed this: John Williams's Air and Simple Gifts, a newly commissioned quartet that started the event, scored for the same quartet as Messiaen's Quartet for the End of Time, and played by four stellar musicians: Itzhak Perlamn on violin, cellist Yo-Yo Ma, Gabriela Montero on piano, and clarinettist Anthony McGill from the Metropolitan Opera Orchestra in New York. (McGill is one of the handful of black musicians who holds a principal job with an American orchestra.)

Sure, Williams' music could hardly have been more derivative or conventional – a soft-focused introduction and coda enclosing a virtuosic setting of Simple Gifts, the Shaker tune that Copland uses so unforgettably in Appalachian Spring (Obama, apparently, is something of a Copland fan). But the fact a new piece of instrumental music was commissioned, played, and listened to by millions in Washington and hundreds of millions around the world is a start, symbolising – who knows? – that classical music won't be forgotten in the in-tray of the Obama administration. Certainly, if Obama lives up to his arts policy document (a very intelligent and well-researched statement of intent), there's hope.