A former county of E Central Scotland, Midlothian (previously Edinburghshire) had an area of 362 sq. miles (937 sq. km). It was bounded to the N by the Firth of Forth, to the E by the counties of East Lothian and Berwickshire, to the W by West Lothian, to the S by Lanarkshire, Peeblesshire and Selkirkshire and the SE by Roxburghshire. Midlothian was run from Edinburgh, which was separately responsible for its own administration as a "county of a city" from 1890. Other settlements included (along the coast) Leith, Portobello and Musselburgh and (inland) Addiewell, Dalkeith, Loanhead, Penicuik. Its principal rivers were the N and S Esk, the Water of Leith and the Gala Water. In 1974 the county was incorporated into Lothian Region, with much reduced boundaries, before being re-established as a separate, smaller entity in 1996.