As Captain of the City Guard of Edinburgh, Captain John Porteous was charged with keeping the peace and when, in April 1736, two convicted smugglers were due to be publicly hanged, the public outcry was such that the hangman had to be placed in protective custody. As the situation worsened, for fear of an attempt to rescue the victims, the Lord Provost of Edinburgh instructed Captain Porteous to call out the entire guard and to furnish them with powder and shot.
After the execution the mob became violent, and Captain Porteous instructed his men to fire into the crowd, killing three people and wounding twelve others. For this offence, Porteous himself was eventually tried in the High Court of Justiciary and found guilty of murder and sentenced to death.
Although later granted a Royal Pardon, Captain Porteous was dragged out to be cruelly tortured and lynched himself at the hands of an angry mob. The spot where he died is today marked by a memorial plate in the Grassmarket.
A detailed account of the so-called Porteous Riots of 1736 is given by Sir Walter Scott in his novel The Heart of Midlothian.