Jeremy Corbyn’s first days in office were always going to offer some predictable hurdles. So much so that one suspects the outrage over “anthemgate”, much like obituaries for anyone over 70, has been lined up ever since he emerged as frontrunner for the title of Leader of Her Majesty’s Opposition. By refusing to sing “God Save The Queen” at yesterday’s Battle of Britain Memorial, Corbyn appears to have interpreted that title literally. But in fact, his stance regarding that particular song has a long and illustrious political history, a history crucial to the rise of democracy as we know it.

Ironically, “God Save The Queen” (or, as was more usual until 1837, “God Save The King”), was originally a Jacobite drinking song, sung in secret in the years after 1688 by those loyal to the exiled Stuart dynasty. Fifty years later, what had started as a Scottish “traitors’” song was rediscovered and repurposed in praise of the Georgian monarchy. Like “Rule, Britannia!”, what we now know as an expression of loyalty thus began life as an expression of dissent.

The song was also subsequently adopted as the royal anthem of the Austrian Emperor, under the title “Heil Der Im Siegerkranz”. It also inspired Haydn to compose “Das Lied Der Deutschen”, the German National Anthem, in direct imitations. This song, more recently tainted due to its wilful reinterpretation by the Nazis, enjoyed an unlikely history as a revolutionary anthem of 1848.

By the time of the French Revolution, “God Save The King” had become a powerful political tool in defence of the old order. It was regularly sung in British theatres, with armed soldiers standing by to enforce its observance. Undeterred, radicals sympathetic to the democratic cause would often attempt to drown it out with renditions of the new French song of liberty, the Marseillaise. These scenes, from Sheffield to Dublin, from Nottingham to Wexford, must have been eerily reminiscent of the famous scene in the film Casablanca.

Then as now, public voices sought to intimidate those who would not toe the official line. In one Edinburgh theatre, a group of Irish medical students sung the Marseillaise instead of “God Save The King”. Outraged, the young Walter Scott armed a group of youths with clubs and attacked the opposition singers. Both factions were immediately banned from the theatre – but Scott and his friends were soon quietly readmitted.

There were subtler ways than this of voicing unorthodox opinion, of course. In the turbulent 1790s, during William Pitt the Younger’s “reign of terror”, freedom of speech was suspended: any who dared criticise what was effectively Britain’s Ancien Régime in print were likely to wind up on a charge for treason. Singing therefore became a key political battleground. Reformers began to write parodies of “God Save The King”, the most famous of which was the Sheffield labourer Joseph Mather’s “God Save Great Thomas Paine”. These were serious rather than comic: ways of declaring loyalty, principle, and solidarity.

Even so, to sing these versions could still land you in prison. Samuel Bamford, one of the leading protestors at Peterloo in 1819, suffered just this fate. Crucially, he entitled his alternative song “The Patriot’s Hymn”. This was central to the reformers’ message: refusing to sing “God Save The King” did not, and does not, preclude a love of one’s country. Quite the opposite. It was precisely because these reformers had what they saw as their country’s best interests at heart, that they could not sing those official words. It is worth noting that many of these men and women were devout Christians. To call on their God to preserve what they perceived as a corrupt established order was nothing less than blasphemy.

It is these singers whom we have to thank for our modern parliamentary system. By rousing and articulating the mass Chartist movement that led to the great Reform Bills of the nineteenth century, these songs of dissent helped create the democracy that Britain’s servicemen were defending in the Battle of Britain. Those who take offense at one man’s refusal to pay lip-service to a song whose sentiments he does not endorse are frequently those most at pains to stress the cherished right of free speech. It was at a time when this right was crushed that the subversion of “God Save The King” became a vital outlet for patriotic British democrats. Now that right has apparently been restored, it is more important than ever that those with a public platform are allowed to speak – and to sing – freely, or to preserve a dignified silence.

Dr Oskar Cox Jensen is a Fellow of the Music Department of King’s College London. His latest book Napoleon and British Song will be published in October.