Newspaper editorial writers condemn those immigrants seeking to trample Australia’s way of life “in blood” or wanting to import historic feuds onto Australian soil. Ethnic and church leaders come under suspicion. Minority religious groups are demonised and despised. Governments limit civil liberties in the name of national security.

It is the stuff of contemporary life as political and community leaders deal with 21st-century terrorism. But all these dynamics have been seen before. One hundred and fifty years ago, Queen Victoria’s preferred heir embarked on a historic first tour of the most remote colonies in the British Empire, only for the tour to end with his life in the balance, and Australians confronting the shock of distance being no barrier or protection.

Just a few years after John Wilkes Booth assassinated President Abraham Lincoln, a young Irish immigrant almost achieved the same infamy when he fired point-blank into the back of Prince Alfred at a public picnic on the shores of Sydney Harbour. It was the biggest crime seen in the country, and the attack and its aftermath made it one of the most controversial political crimes in Australian history, yet, as eminent historian Prof Geoffrey Blainey has commented, now “a forgotten milestone” in the story of Australia.

The story of Henry O’Farrell is one that exposes an ugly chapter in Australian history

Perhaps that is because the story of Henry O’Farrell is one that exposes an ugly chapter in Australian history, and shows some of the revered fathers of federation were leading players in showing how a criminal atrocity, religious zealotry, prejudice and political over-reach can bring a community to the edge of disorder.

O’Farrell’s name and crime is immortalised only on a small plaque at Clontarf Beach, recording it as the site where he attempted to assassinate the Duke of Edinburgh. But his shooting, which a Royal Navy lieutenant described as “the most cowardly tragedy since Wilkes Booth electrified the world in the Washington Theatre”, created echoes that continue to resonate today.

O’Farrell was only a young boy when his parents, who hailed from Arran Quay, Dublin, brought their family to find a better life in Melbourne only a few years after its European founding. He was then too young to know of the Irish-British troubles and religious divide, but his father ensured his son was wrapped in the arms of the new St Patrick’s Society, the heartland of Irish Australian consciousness, of which he was a founding member, and the Catholic Church.

The O’Farrell trial and death sentence are seen by many criminal lawyers and forensic psychiatrists as their own tragedy, one of vengeance over justice, a “legal charade”

Henry heard protests against attacks on the “mere Irish” by those wanting to deprive them of religious and civil liberty, and exhortations that “when an Irishman forgets his country he forgets himself”. He was also adopted by newly arrived Irish Catholic leaders who chafed at the pro-British orientation of their predecessors and wanted to train some Australian-raised clergy.

Henry was tutored and ordained as a deacon, but his destiny to become a priest soon after a religious study tour of Rome and Ireland. It was speculated he had a dispute with the church hierarchy, perhaps over his celibacy vows, or an unwillingness to fully embrace the Irish cause, or because his older brother, a lawyer, had fallen into a life-long dispute with his senior Catholic clients over what he felt was immoral behaviour. Whatever the cause, Henry began to think more of his birthplace country than his church, and became enveloped in a spiral of drink, epilepsy, erratic behaviour and financial ruin.

Regarded by some as “mad” and dangerous, he embraced the Irish cause more than ever, pronouncing himself a partisan of Fenian leader James Stephens. He absorbed the local newspaper reportage of failed Irish uprisings, the British and colonial establishments’ denunciation of Irish and Fenian ambitions as “a madman’s dream” and the passionate exhortations of Irish clergy at packed public meetings in New York that exile did not diminish Irishness, and it was “the duty of every Irishman to combine and revolt” against the evils of English rule.

Developing a vindictive animosity towards British aristocracy and Catholic clergy who failed to press the Irish cause, Henry changed from an intelligent, articulate young man to one given to almost incoherent and venomous writings in his diary. He still carried a crucifix, but now he also had two guns, and a plan to make his mark. As the rest of the colonial community, who overwhelmingly regarded themselves as British and belonging to the mother country, were beside themselves in late 1867 with excitement with royal blood on their shores, O’Farrell wrote to the editors of The Irishman and The Nation in Dublin, saying he intended to shoot the prince, knowing it would cost him his life.

In March 1868, armed with two American Civil War weapons, he fulfilled what he portrayed to himself as his mission, firing at Alfred from point-blank range. The prince was saved by a bullet deflecting from his Indian rubber braces, bypassing his major organs in what the Medical Journal said was “one of the most extraordinary escapes which has ever been recorded in the history of gunshot wounds”. The bullet was removed and Alfred had the additional good fortune to be nursed by the first Florence Nightingale-trained nurses who had arrived in Australia only a few weeks before.

Henry O’Farrell is arrested after shooting Prince Alfred at Clontarf in Sydney

The crowd at Clontarf endeavoured to lynch O’Farrell on the spot. But further violence was narrowly averted, and he was quickly put on trial before a jury drawn from a community shocked, shamed, and demanding “justice” and a clear demonstration of “loyalty”. Political leaders and even senior Catholics and opponents of capital punishment demanded the death penalty.

O’Farrell’s lawyer sought to make an insanity defence, but was unable to utilise medical witnesses who were convinced he had long been mad, and a jury, unsurprisingly, quickly found him guilty and he was hanged.

Today the O’Farrell trial and death sentence are seen by many criminal lawyers and forensic psychiatrists as their own tragedy, one of vengeance over justice, a “legal charade” played out so it could be said the rule of law had been applied.

The then Colonial Secretary, Henry Parkes, opportunistically fanned a moral panic as he sought to prosecute his animosity towards the Irish and Catholics

Broader miscarriages of justice and fairness were also in play. The then Colonial Secretary, Henry Parkes, opportunistically fanned a moral panic as he sought to prosecute his animosity towards the Irish and Catholics, reinforce his British credentials after earlier flirting with republican sentiments and pursue what some described as Napoleonic ambition. Convinced O’Farrell could not have committed the act on his own and must have been part of a broader conspiracy to overthrow colonial and empirical rule, Parkes personally questioned O’Farrell in his cell, employed a posse of private investigators, used government money to fund spies, including a criminal released from prison after he claimed to be a former Fenian insider, and suppressed vital evidence from the trial and parliament.

Parkes ignored anything in O’Farrell’s notebook or conversations which evidenced signs of mental instability, contradiction or sense of mischief, hearing only the Irishman’s whispered tale of secret Fenian cells and co-conspirators. A hastily passed Treason Felony Act banned anyone from voicing, writing or printing pro-Fenian or anti-royal sentiment. Even refusing to participate in a toast to the Queen was deemed seditious.

People could be prosecuted if their intent or language was cited by two credible witnesses, and Justices of the Peace were empowered to enter a suspected person’s house, by force if necessary, to search for papers or weapons. Penalties included hard labour for seven years and even life.

Irish police, soldiers and government officials were dismissed, advertisements declared “no Irish need apply”, women were advised not to wear green, and even Catholic archbishops were pressured to declare their “loyalty”.

Premier James Martin, who prosecuted O’Farrell, said the laws to suppress and punish sedition were intended to be “large enough to embrace any attempts at deposing the Queen or establishing a republic...here or elsewhere”. But even Downing Street and the Queen’s advisers thought the measures excessive and thought was given to not providing royal assent.

But the colonial rulers would not have administrators or newspapers in London telling them their laws were insane, cruel or silly. Nor would they listen to Prince Alfred, who changed his initial conviction that he was a victim of organised Fenianism and argued O’Farrell ought not be executed for a crime which was not a capital offence in Britain, and should be offered a form of exiled asylum.

But Parkes remained steadfast that he had not been “played” by O’Farrell, despite the Irishman’s final confession that all his tales of Fenian conspiracy were a concoction, and felt he and his colleagues had done a sterling job in suppressing further seditious activity.

The lack of evidence to substantiate a conspiracy meant community fears subsided, and the Queen and British government made it clear they would not question colonists’ loyalty or Britishness. The colonies breathed a huge sigh of relief: the Prince had survived, the assassin had been hanged, and all remained good with the mother country.

But echoes continued for years, some to this day.

Parkes, lampooned by his opponents, admitted the crime and aftermath poisoned friendships and political debate for years afterward. But he rebounded and became an influential “father” of federation in 1901. But it was a very crimson, far from republican form of unity. Republican sentiment was modest and put aside during the celebration of Alfred’s visit, but the aftermath of inter-colonial, political and religious rivalry meant there was no prospect of a calm, rational and united republican resolve, and English authorities were not encouraged to think colonists sufficiently mature to handle independence.

Some of those dynamics still prevail. Former prime minister John Howard, who led the “no republic” vote in a 1999 referendum, might have been echoing Henry Parkes when he cited “stability” and said while a republic would come eventually he did not want this “Catholic, Labor republic”, a Parkesian rejection of any Irish, anti-Britain, anti-royal republicanism. Today the former republican movement leader is PM, but even Malcolm Turnbull felt obliged recently to declare himself “a republican and an Elizabethan”, cognisant of public sentiment towards royalty and especially the Queen.

A century and half after Parkes angered the Catholic Church by diminishing its education influence, debates about government funding of church schools remain heated.

The fear and loathing toward “disloyal” Irish Catholics 150 years ago eventually faded under the weight of their substantial contributions in the development of Australia, and the emergence of bigger fears, such as communists and Asians. Today it is the turn of Muslims to be not trusted.

As with Henry O’Farrell, the challenge of a lone wolf remains. And just as the Fenians were the first intercontinental group to take advantage of a new mobility of people, ideology, money and weapons, globalisation and technology continue to underpin 21st-century terrorism.

Leadership challenges in times of major crime and conflict, community fear and distrust, are unchanged.

In a moment of madness, Henry O’Farrell shot a prince and paid the ultimate price. His crime has been largely forgotten, but the lessons of moral panic, political over-reach, religious bigotry, judicial unfairness, suppression of civil freedoms, prejudice and guilt by association are lessons that ought never be forgotten.

Steve Harris is author of The Prince and the Assassin, Australia’s First Royal Tour and Portent of World Terror, published by Melbourne Books. He is also former publisher and editor-in-chief of The Age, and former editor-in-chief of the Herald and Weekly Times Group. In Ireland The Prince and the Assassin is available from all online bookstores such as Book Depository, which provides free postage, and Amazon