The modern council area was formed in 1975 when the historic county of Midlothian, also known as Edinburghshire, was altered substantially as part of local government reforms; its southern part formed a new Midlothian District within the Region of Lothian, whilst areas on the peripheries were assigned to other districts and the city of Edinburgh, which had always been autonomous to an extent, was formally separated as the City of Edinburgh District.
The Midlothian district was smaller than the area of the pre-1975 county, parts of which went to other districts:[3][4] Currie, Balerno, Ratho and Newbridge to the city of Edinburgh; Musselburgh burgh and parish of Inveresk (which included the villages of Inveresk, Wallyford and Whitecraig) to East Lothian; East Calder, Mid Calder and West Calder) and the Midlothian part of Livingston to West Lothian; Heriot and Stow parishes to the Ettrick and Lauderdale district of the Borders region.
[8] In 1991 the council built itself a new headquarters called Midlothian House at 40-46 Buccleuch Street in Dalkeith.
The Borders Railway runs between Tweedbank to Edinburgh, with four stations in Midlothian – Shawfair, Eskbank, Newtongrange and Gorebridge.
[citation needed] Midlothian is twinned with Komárom-Esztergom, Hungary and Kreis Heinsberg, Germany.