IF you walk slightly to the west of St Giles Kirk in the High Street of Edinburgh you will find a heart-shaped mosaic set into the pavement with a granite X picked out in coloured setts at its centre.

The X marks the spot where the front door of the capital’s Old Tolbooth stood from the 15th century to 1813 – one of several places of execution in and around Edinburgh in bygone days.

To this day, local people – not all of them Hibs fans – will often stop to spit disdainfully on the Heart of Midlothian, as this quaint memorial is called. For the Old Tolbooth was indeed at the heart of affairs in the city of Edinburgh in the county of Midlothian, and as an administrative centre and a prison, it was not a popular place.

The Old Tolbooth was also the scene of one of the most extraordinary criminal acts in the history of Edinburgh and Scotland. For the prison housed Captain John Porteous, the man whose horrendous death was at the centre of the eponymous riots by the infamous Edinburgh Mob in 1736.

It is actually highly accurate to call them the Porteous Riots, for the first “riot” was instigated not by the mob but by Porteous in his role as captain of the town guard, and the second “riot” was a deliberate and well-organised lynching of the captain.

His name will forever be associated with the events so memorably portrayed by Sir Walter Scott in his novel The Heart of Midlothian published in 1818.

Scott did not have to sensationalise the story of the riots, for the facts were quite remarkable in themselves.

The Edinburgh Mob had been feared by the authorities for centuries, so much so that it was dubbed the Beast. In the Old Town where people crowded into tenemented properties up and down either side of the High Street, there was plenty to annoy the populace.

Whenever it took their fancy, agitators – nowadays we might call them community activists – would raise a hue and cry and within minutes the Edinburgh Mob had formed and would ransack properties and seek out the common enemy while often carrying out some lucrative looting as well.

There was no particular leader, at least until a remarkable character called Bowed Joseph appeared sometime after the Porteous Riots – he will feature in a future column.

In the century before Porteous, the mob rioted against King Charles I’s attempts to impose the English prayer book, then ransacked Holyrood Abbey in protest at the Catholicism of James VII and II, before its fiercest and most sustained rioting in protest against the Act of Union in 1707.

Scott wrote: “The Mob of Edinburgh, when thoroughly excited, has been at all times one of the fiercest which could be found in Europe; and of late years they had risen repeatedly against the government, and sometimes not without temporary success.”

Thanks to Scott and to the remarkable story of Captain Porteous’ trial by William Roughhead plus eyewitness accounts including two by famous cultural figures, we know pretty much everything that happened when the Mob went on the rampage in 1736.

The prelude to it was a daring raid on a Fife customs official by two convicted smugglers, Andrew Wilson and George Robertson, and their accomplice William Hall. They were caught when Hall was duped into naming his nefarious colleagues with the promise of a pardon.

All three were sent for trial to the High Court, found guilty and sentenced to death. They were taken to the Old Tolbooth to await their fate, scheduled for Wednesday, April 14, 1736.

Before the execution could proceed, Hall was taken from the Tolbooth and sent into exile, his sentence commuted presumably because of the pardon he had been offered. Roughead wryly wrote: “One of the peculiar characteristics of their ancient prison was its remarkable incapacity to retain such of its inmates as were blessed with influential friends.”

That left Wilson and Robertson to escape or die, and on the Sunday before their execution they duly tried to flee, having failed in an earlier attempt.

Leading Kirk figure and writer the Rev Alexander “Jupiter” Carlyle witnessed the escape from the Tolbooth church: “The bells were ringing and the doors were open while the people were coming into the church. Robertson watched his opportunity, and, suddenly springing up, got over the pew into the passage that led in to the door in the Parliament Close, and, no person offering to lay hands on him, made his escape in a moment – so much the more easily, perhaps, as everybody’s attention was drawn to Wilson, who was a stronger man, and who, attempting to follow Robertson, was seized by the soldiers, and struggled so long with them that the two who at last followed Robertson were too late.”

ROBERTSON vanished abroad and was never recaptured, and Wilson was thus left alone to be hanged. On the day in question a large crowd, many of them sympathetic to Wilson as nobody liked the Customs officials, gathered to watch the hanging at the gallows in in the Grassmarket.

Captain John or Jock Porteous, a bully and a braggart and probably drunk, led his town guard to convey Wilson to his execution, having been instructed to do by Lord Provost Alexander Wilson for fear of the mob rioting.

The poet Allan Ramsay, father of the renowned painter of the same name, wrote this account which includes his spelling: “The criminal was conducted to the tree by Captain Porteous and a strong party of the city guard. All was hush, Psalms sung, prayers put up for a long hour and upwards and the man hang’d with all decency & quietnes.

“After he was cut down and the guard drawing up to go off, some unlucky boys threw a stone or two at the hangman, which is very common, on which the brutal Porteous (who it seems had ordered his party to load their guns with ball) let drive first himself amongst the innocent mob and commanded his men to follow his example which quickly cleansed the street but left three men, a boy and a woman dead upon the spot, besides several others wounded, some of whom are dead since…

“Believe this to be true, for I was ane eye witness and within a yard or two of being shot as I sat with some gentlemen in a stabler’s window oposite to the Galows.

“After this the crazy brute march’d with his ragamuffins to the guard, as if he had done nothing worth noticing but was not long there till the hue and cry rose from them that had lost friends & servants, demanding justice.

“He was taken before the Councill, where there were aboundance of witnesses to fix the guilt upon him. The uproar of a mob encreased with the loudest din that ever was heard and would have torn him, Council and Guard all in pices, if the Magistrates had not sent him to the Tolbooth by a strong party and told them he should be tried for his life, which gave them some sattisfaction and sent them quietly home.”

Nine people were killed in all. Porteous was indeed tried for murder, and as someone who was deeply disliked in the city, he had no chance. The jury found him guilty and the judges pronounced the required sentence of death by hanging.

At this point the Government of the United Kingdom, then less than 30 years in existence, intervened to commute Porteous’s sentence, with Queen Anne issuing what was actually only a temporary reprieve until a pardon could be arranged.

The Edinburgh public were having none of it.

On the evening of the appointed day of execution, September 7, Porteous was having a party in the Tolbooth to celebrate his good fortune.

At this point a group of conspirators called out the mob, but only to back up their daring plan. They overpowered the prison guards and caught Porteous trying to escape.

He was dragged to the Grassmarket, but the gallows had been taken down so someone fetched a rope and they hanged Porteous from the pole of a dyer’s shop. Hundreds of the mob stood around in silence watching the events unfold.

Not being hangmen, they had to string a still-alive Porteous up again, breaking his arm and shoulder in doing so. This time the captain died, and the mob simply went home.

Despite a parliamentary inquiry and several attempts to identify and charge ringleaders, no one was ever convicted of the execution of Porteous, though the City of Edinburgh was fined £2,000 by the Government and Lord Provost Wilson was disqualified from holding office again.

A plaque erected by the Porteous Associates on the 264th anniversary of the lynching can be seen near the place where the captain met the terrible end that assured his name would have a place in history.