The regiment was raised on 18 March 1689 by David Leslie, 3rd Earl of Leven to defend Edinburgh against the Jacobite forces of James VII.
The regiment was judged to have performed well and was granted the privilege of recruiting by beat of drum in the City of Edinburgh without prior permission of the provost.
[6] The 3rd (Militia) battalion was embodied in January 1900 for service in the Second Boer War, and 998 officers and men embarked for South Africa on the SS Kildon Castle two months later.
The troops attacked "hostile but unarmed" protesters with rifle fire and bayonets - resulting in the deaths of four civilians and injuries to in excess of 30 more.
After being evacuated from Gallipoli in January 1916 it moved to Alexandria in Egypt and then landed at Marseille in March 1916 for service on the Western Front.
[13] A detachment of the battalion was responsible for killing four and wounding 38 unarmed civilians during an altercation with a crowd on the day of the Howth gun-running in July 1914.
After being evacuated from Gallipoli in January 1916 they moved to Egypt and then took part in the Third Battle of Gaza in November 1917[14] before landing at Marseille in April 1918 for service on the Western Front.
[14] One of its heaviest losses during the war was at the ill-fated Battle of Arnhem in which the 7th Battalion, as part of the 1st Airlanding Brigade of 1st Airborne Division, suffered 90% casualties in September 1944;[17] they defended the perimeter in Oosterbeek against 2nd SS Panzer Corps.
[14] After the Second World War, the regiment served internal security duties in the British Mandate of Palestine and was reduced to a single battalion around 1948.
The regiment was part of the United Nations forces that saw action at the First Battle of Maryang San in October 1951 during the Korean War.
Within a year of its return to the UK in May 1965, the regiment was again deployed overseas in response to Indonesia's aggression in Borneo against newly formed Malaysia.
[20] The regiment was at first deployed in Hong Kong, replacing a Gurkha battalion sent to Borneo, then to the Jungle Warfare School at Kota Tinggi in Malaysia in August 1965.
[20] It was subsequently regularly posted to Northern Ireland as part of Operation Banner during the Troubles and suffered casualties during the 1989 Derryard attack which killed two of its men.