It was planned as the largest hostage-taking in history, with three-and-a-half million people and nearly four million square miles of land at stake.

Before dawn on June 1st, 1866, John O’Neill, a flinty-eyed Civil War veteran, led about eight hundred Irish republicans across the Niagara River and into British-controlled Canada. Their mission: capture Canada and hold it at ransom in exchange for Irish independence. The raid didn’t work out as planned, however — and the country that won its independence wasn’t Ireland.

Of the more than three million men who fought in the Civil War, a staggering five percent of them were born in Ireland. The catastrophic famine a generation earlier had killed nearly a million people and forced another million overseas. These exiles formed militias and drilled in anticipation of their triumphant return to liberate the homeland from British rule. The Civil War proved a fertile training ground for these Irish soldiers: all-Irish regiments like the New York 69th marched out through tenement-lined streets cheered on by an expatriate community that saw not Union troops but a nascent Irish army. Irishmen fought on both sides of the war — sometimes against one another — flying neither Union nor Confederate banners, but the green flag of their once and future nation.

O’Neill made his way to the States from County Monaghan as a teenager in 1848. By the time war broke out, he was a cavalry sergeant in California. Frustrated by the obstacles an Irishman faced in moving up the ranks, he made a surprising move, finding a commission in 1864 as a captain in the 17th United States Colored Infantry. By war’s end, he was once wounded and twice cited for bravery.

Post-Civil War America was awash with arms and battle-hardened soldiers looking for something to do. Like many Irish veterans, O’Neill joined the Fenian Brotherhood, an America-based republican organization named after folk hero Fionn mac Cumhaill’s legendary band of warriors. By early 1866, O’Neill had won the respect of Thomas William Sweeny, known as “Fighting Tom,” a hot-headed one-armed brigadier general born in Cork, who had commanded troops at Shiloh and in the Atlanta Campaign – and the Fenians’ Secretary of War. After the Civil War, Sweeny left the Union Army to form another one, and from his position within the Brotherhood, he hatched the plan for invading Canada. Irish soldiers had no hope of crossing the Atlantic en masse and undetected, so crossing the Niagara seemed a reasonable second-best. As a Fenian song at the time put it: “we’ll go and capture Canada, for we’ve nothing else to do.”

Secrecy was not the Fenians’ strong suit. Their plans for an attack were widely known. But many Yankees relished the prospect of a Britain humiliated through an Irish triumph, resenting what they perceived to be British support for the South during the Civil War. Hence the unauthorized transfer of rifles from a Buffalo arsenal into Fenian hands. Hence the milita’s unimpeded journey across the Niagara River while the side-wheeler gunboat USS Michigan sat passively by. Hence the slow response from Washington, which intervened only when not doing so would clearly violate America’s treaty of neutrality with Britain.

Under a waning gibbous moon that early June morning, O’Neill’s detachment slid across the still waters of the Niagara, planted a green Fenian flag on Canadian soil, and hurried to cut telegraph wires and secure the rail yards near Fort Erie. A flotilla of small crafts ferried Fenian volunteers across the Niagara well into the following day. On June 2nd, O’Neill’s men clashed with Canadian troops near Ridgeway and Fort Erie. The Canadian force consisted mostly of local militiamen with no combat experience, and they were quickly scattered by the war-tested Fenians.

Twice victorious, O’Neill soon ran out of options. The revolt’s success required stirring up Irish nationalism on the Canadian side of the border, but the mostly Protestant Irish in southern Ontario were hostile to the Fenians’ aims, and Catholics took their cues from Thomas d’Arcy McGee, a future father of Canadian confederation who mistrusted American influence and sought Irish emancipation in an independent Canada. Thus, on one side of the Niagara, the Fenians found little popular support as five thousand British regulars and Canadian militiamen closed down on Fort Erie; on the other side, American troops stirred into less sluggish observance of their neutrality treaty with Britain cut off the flow of volunteers and supplies across the river. Desperate to escape, some Fenians swam or paddled makeshift rafts back to Buffalo. Ever mindful of anti-British sentiment and the power of the Irish vote, Washington imprisoned very few of the rebels, instead buying them train tickets home in the hopes of dispersing them.

The Fenian invasion was brief and incurred little loss of life, but it set off alarm bells in Canada. O’Neill’s attack was followed by a less successful Fenian assault on Quebec. This common enemy strengthened fellow-feeling between the British provinces of North America, and ignited a national sense of indignation. Talk of greater autonomy for Canada was already in the air, and the raids swung popular opinion in the direction of confederation: a military command based in Ottawa rather than London would coordinate national defense more effectively. A year later, on July 1st, 1867, the British North America Act took effect, giving birth to the Dominion of Canada.

For his successes at Ridgeway and Fort Erie, O’Neill was elevated to the presidency of one half of an increasingly fractious Fenian Brotherhood. Undaunted by his 1866 failure, he launched two more abortive raids into Canada in 1870 and 1871 — the responses to which were among the first military actions undertaken by the Canadian armed forces — but the glory days of the Fenian Brotherhood were over. A united Canada was alert to the Fenian threat, and American authorities were increasingly intolerant of armed militants roving free within their borders. O’Neill dedicated his last years to resettling Irish slum tenants from east coast cities to the Great Plains, and died of a stroke in 1878.

His legacy did not perish with him. Irish Republicans struggled for another half-century after O’Neill’s raid before winning independence for the twenty-six counties in the south of Ireland. Republicans and Unionists achieved some measure of peace over the remaining six counties of Northern Ireland less than fifteen years ago. Throughout the Troubles, the IRA drew significant funding and support from Irish nationalists in the United States, notably the Clan na Gael — a direct descendant of the Fenian Brotherhood.