Cockpen

Cockpen is a parish in Midlothian, Scotland, containing at its north-west corner the town of Bonnyrigg, which lies 2 mi south-west of Dalkeith. It is bounded on the west and north by the parish of Lasswade, on the east, by Newbattle and on the south by Carrington. It extends about 3 mi from north to south and its greatest breadth is about $2 1/2$ miles (4.0 km).

The parish lies between the rivers North Esk and South Esk, which join about 2 miles north of the parish. At Lasswade the parish reaches the North Esk which at that point forms the boundary on the north-west side, such that the suburb of Westmill on the south-east bank lies in the parish of Cockpen. The South Esk briefly forms the southern boundary of the parish then flows northward through the parish past Dalhousie Castle, exiting in the north-east into Newbattle parish.

A Parochial Board was established under the Poor Law (Scotland) Act 1845. Within the parish of Cockpen a police burgh was created at Bonnyrigg in 1865 (although part lay in the parish of Lasswade). Police burghs were communities over a certain size which were entitled to police many of their own affairs, such as cleansing, street lighting and water supply as well as public order. Police burghs were run by elected commissioners or magistrates.

With the Local Government (Scotland) Act 1894 the Parish Council was established, but this only administered the “landward” part of the parish, i.e. outside Bonnyrigg. Under the terms of the Local Government (Scotland) Act 1929, Bonnyrigg and Lasswade were united to become the burgh of Bonnyrigg and Lasswade. The burgh was abolished in 1975 and subsumed into Midlothian district of Lothian region The parish council ceased in 1930 when parish councils in Scotland were abolished, but civil parishes persist for census and other non-administrative purposes.

From the 12th to the 19th centuries the parish of Cockpen comprised the same area as the Barony of Dalhousie (a corruption of Dalwolsie). The lands of Dalhousie have been owned by the Ramsays since the 12th century having been given to them by the monks of Newbattle Abbey. The patronage of the parish church belonged anciently to this family. In May 1542, James V granted to Nicol de Ramsay, of Dalhousie, a power of Justiciary over his lands of Dalhousie, and Carrington, in the county of Midlothian (Edinburghshire), but this appears to have expired on his death in 1554. There have been a succession of fortresses at their seat, Dalhousie Castle, which lies on the north bank of the South Esk. The castle was successfully defended against Henry IV in 1400, and in 1648, it was occupied by Cromwell. The present building dates from the 15th century.

The parish church is 1 mi south-east of Bonnyrigg on rising land on the west bank of Dalhousie Burn. The building dates from 1820 and replaced an earlier structure.

The South Esk, after leaving Dalhousie Castle, passes close by the romantic place where Cockpen House stood, the mansion of the Laird o' Cockpen, the subject of the traditional Scottish song of that name.

The area of the parish is 2938 acre. The civil parish has a population of 10,466 (in 2011).

Etymology
Cockpen is agreed to be a Cumbric name cognate with Welsh coch 'red' + pen 'peak'.

In popular culture
The late-18th century song The Laird o' Cockpen by Carolina Oliphant, Lady Nairn, describes a Cockpen estate owner who fought on the Royalist side at the 1651 Battle of Worcester.