This notorious tumult took place at Edinburgh in September, 1736. Porteous was captain of the city guard. At the examination of a criminal named Wilson, Captain Porteous, fearing a rescue, ordered the guards to fire on the mob, which had become tumultuous; in this discharge six persons were killed, and eleven wounded. Porteous was tried for this attack and condemned to death, but reprieved. The mob, at his reprieve, burst into the jail where he was confined, and, dragging him to the Grassmarket (the usual place of execution), hanged him by torchlight on a dyer's pole.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Porteous Riot from Fact Monster: