Brecon, archaically known as Brecknock, is a market community as well as area in Powys, mid-Wales. In 1841, it had a population of 5,701. The population in 2001 was 7,901, boosting to 8,250 at the 2011 census. Historically it was the county town of Brecknockshire (Breconshire); although its duty because of this was overshadowed with the formation of the County of Powys, it stays an important local centre. Brecon is the third-largest town in Powys, after Newtown and Ystradgynlais. It exists north of the Brecon Beacons chain of mountains, but is just within the Brecon Beacons National Park.