Two hundred years ago, on 23 February 1820, a new sort of terrorism was foiled when police raided a backstreet stable loft in central London and caught men preparing to assassinate the entire British cabinet.

The so-called Cato Street conspiracy has echoes in more modern outrages. At the time it terrified ministers in Lord Liverpool’s Tory cabinet. But the overwhelming likelihood is that the real conspiracy was provoked and inspired by a spy in the pay of the government itself.

As James Ings, one of the plotters, an unemployed butcher from Hampshire, claimed at his trial: “This man has been at all the meetings, he has planned and done everything … I am sold like a bullock driven into Smithfield market.”

The conspiracy was the culmination of a series of demonstrations and uprisings that arose from economic dislocation, high food prices, high unemployment and reduced wages following the Napoleonic wars. It came six months after the Peterloo massacre, when armed troops had broken up a peaceful meeting calling for political reform in Manchester, killing 18 people and injuring hundreds more.

Facebook Twitter Pinterest The Surprise of the Cato Street Conspirators, an engraving by Paul Hardy. Photograph: Historical Images Archive/Alamy

Some had already concluded that orderly demonstrations were not enough and that the government needed to be overthrown by force. Among them was Arthur Thistlewood, a 44-year-old Lincolnshire farmer’s son, who had drifted to London and become involved in previous violent protests. He had already led a mob attempting to seize the Bank of England in 1816, but was acquitted at his trial for treason after the chief prosecution witness was exposed as an agent provocateur. After that he had tried to emigrate to the US but lacked the money for his fare.

The government kept tabs on him, but he continued plotting, abandoning a plan to drop a bomb on the heads of MPs in the Commons chamber in 1819 as impractical. Now the death of King George III in January 1820 appeared to give him another chance. He believed troops would be deployed away from London to Windsor, to guard the unpopular new king, George IV.

His trusted ally was George Edwards, who made plaster statuettes and formerly ran a shop in Eton High Street selling models of the school’s hated headmaster, John Keate, to the pupils for target practice. Edwards showed Thistlewood a newspaper that said the entire cabinet would be meeting for dinner at the government minister Lord Harrowby’s house in Grosvenor Square.

Thistlewood seized the chance: he and his followers would invade the house and decapitate the ministers with cutlasses, sticking their heads on pikes on London Bridge. He called it “the West End job”. They would capture cannon from the artillery ground at Finsbury, take over the Bank of England and distribute its coinage, burning the paper currency as valueless. “Your tyrants are destroyed,” their manifesto would proclaim. All land would be held in common, redistributed from the aristocracy, and they believed a grateful working class would rise in support of their provisional government.

Thistlewood hoped that at least 50 followers would turn up to help when they gathered in a loft above a dilapidated stable in Cato Street off Edgware Road. But on the night only 20 men arrived. Alarmed at how few of them there were, some attempted to back out, but others started to distribute swords, clubs and muskets provided by Edwards. Desperately, Thistlewood told them: “For God’s sake, do not think of dropping the business now.”

Outside in the street, Bow Street Runners were gathering, and a detachment of the Coldstream Guards was stationed nearby. The authorities knew all about the plan because Thistlewood’s trusted sidekick, Edwards, was in the pay of the government. Another of those in the loft, a milkman named Thomas Hiden, was also a spy and had warned Harrowby, the president of the council, of the plot. The cabinet had no intention of meeting that evening.

The Bow Street Runners broke into the stables and clambered up a ladder into the hayloft, where they were met with chaos as some plotters grappled with them and others attempted to flee in the darkness. Thistlewood ran one of the officers through with a sword before clambering out through a window.

Many of the men were captured outside and others were rounded up after a list of names and addresses was found on one of the captives, William Davidson, from Jamaica where his father had been attorney general. Thistlewood unwisely took Edwards’s advice to hide in lodgings in Moorfields, where he was arrested the following morning.

Some of the plotters turned king’s evidence, while others were transported to Australia, but Thistlewood and four others, including Ings and Davidson, were put on trial. All five men were literate, but all had fallen on hard times and were desperate. Their fate was not in doubt, though Edwards was spirited out of the country by the government and did not give evidence. He would die in South Africa in 1843.

All five men were sentenced to death and, in a relic of the old punishment of hanging and quartering, were to be beheaded after death. The day before, Ings wrote to his wife: “Think nothing of my unfortunate fate, for I am gone out of a very troublesome world and I hope you will let it pass like a summer cloud over the Earth.”

On the scaffold outside Newgate prison on 1 May 1820, in front of a crowd of thousands, Ings shouted: “Give me death or liberty! Remember me to King George, God bless him!” Thistlewood, sucking an orange, said: “I hope the world will be convinced that I have been sincere in my endeavours and that I die a friend to liberty.”

Half an hour after their hanging, the bodies were taken down and a masked executioner cut off their heads with a butcher’s knife, holding them up to show the crowd. It was an act that caused such revulsion that it was never tried again. Dorothea Lieven, the wife of the Russian ambassador, who had witnessed the spectacle, wrote later that morning: “I feel pity for these poor human beings for these aberrations of mind and imagination. I do not believe in the existence of a human being evil at heart.”

The government’s savage crackdown worked for the time being as economic conditions improved. It would be another 164 years before the IRA came closer to assassinating a Tory cabinet at the Grand Hotel in Brighton than Thistlewood had ever done.