The Police Act of 1805 standardised the running of police forces to patrol Scotlands burghs and led to the creation of a professional force in Edinburgh.
Previously, retired soldiers formed the town guard and they continued to do so until 1817 whn they were disbanded. The High Constables of Scotland were also charged with protecting the peace, patrolling Edinburgh’s streets in times of disorder and attending ceremonial duties to protect the king. They continue to exist as an organisation until today undertaking ceremonial duties.
The surprising thing about policemen in the 19th century is that they were responsible for street pavement repairs and street lights as well as the catching of criminals. The police force was run by a board of commissioners independent of the council and in 1831 Edinburgh a town of 100,000 there were 312 policemen. The police model in Edinburgh followed a Parisian style until William Haining was appointed superintendent from the London Metropolitian police.
In 1843 the Edinburgh police force was reorganised by Superintendent Haining assisted by another London officer called W F N Smith moved from Greenwich and at that point moved to an English style of policing.