Castlebar (Irish: Caisleán an Bharraigh, meaning "Barry's Castle") is the county town of County Mayo, Ireland. It is in the middle of the county and is its largest town by population.
A campus of Galway-Mayo Institute of Technology and the Country Life section of the National Museum of Ireland are two important local amenities. The town is linked by railway to Dublin, Westport and Ballina. The main route by road is the N5. The town is surrounded by several villages, including Ballintubber. Its economy is primarily service-based.
The modern town grew up as a settlement around the de Barry castle, which was built by a Norman adventurer in 1235 and was later the site of an English garrison. The castle was located at the end of Castle Street, where the town river is thought to have originally flowed. Castlebar Barracks operated in the town for many years: it was finally closed in March 2012 and the buildings and grounds have been purchased by the local town and county councils. Armed conflict has been the centrepiece of the town's historical heritage. French forces under the command of General Humbert aided in a rout of the British garrison in the town during the failed Irish Rebellion of 1798, which was so comprehensive it would later be known as "The Races of Castlebar". A short-lived provisional Republic of Connacht was declared following the victory and John Moore, head of the Mayo United Irishmen and the brother of a local landowner, was declared its president. His remains are today interred in a corner of the town green, known as the Mall, previously the cricket grounds of Lord Lucan, whose family (the Binghams) have owned and still own large tracts of the town and county. The town received its charter from King James I in 1613, and is today governed by an urban district council, a subdivision of Mayo County Council. The Lake in Castlebar is also known as Lough Lannagh.
Castlebar was a constituency represented in the Irish House of Commons from 1614 to 1800. The area is in County Mayo. Between 1725 and 1793 Catholics and those married to Catholics could not vote.
In the Patriot Parliament of 1689 summoned by King James II, Castlebar was represented with two members.