Carstairs is located 5 miles (8 kilometres) east of the county town of Lanark and the West Coast Main Line runs through the village.
The two places are two completely different villages divided by 1 mile (1.5 kilometres) of land, a parkland area (Monteith Park) and the railway line.
[2] The first part of the name is the element cajr,[2] of which the primary sense is "an enclosed, defensible site" (Welsh caer; compare Cardiff).
[3] A parish school was opened in 1619, and by 1754 William Roy recorded a sizeable farming village on the Lanark road to Carnwath and Edinburgh.
In its last months, the Ministry of Labour used the inmates to help the Scottish Office Prison Department to build a new secure hospital.
[5] Carstairs has gained a certain notoriety as the location of the State Hospital, a maximum-security psychiatric facility where some of Scotland and Northern Ireland's most severe cases of mental illness are treated.