Bonnyrigg is a town in Midlothian, Scotland, eight miles (13 kilometres) southeast of Edinburgh city centre, between the Rivers North and South Esk. The town had a population of 14,663 in the 2001 census, rising to 15,677 in the 2011 census, both figures being based on the 2010 definition of the locality, which, as well as Bonnyrigg and the adjacent settlement of Lasswade, includes Polton village, Poltonhall housing estate, and modern development at Hopefield. The estimated population as of 2018 was 18,120, the highest of any town in Midlothian. Along with Lasswade, Bonnyrigg is a twin town with Saint-Cyr-l'École, France.