The origins of the city date back to the founding of a monastic establishment on the site of Bangor Cathedral by the Celtic saint Deiniol in the early 6th century AD. Bangor itself is an old Welsh word for a wattled enclosure, such as the one that originally surrounded the cathedral site. The present cathedral is a somewhat more recent building and has been extensively modified throughout the centuries. While the building itself is not the oldest, and certainly not the biggest, the bishopric of Bangor is one of the oldest in the UK.
In 973, Iago, ruler of the Kingdom of Gwynedd, was usurped by Hywel, and requested help from Edgar, King of England, to restore his position. Edgar, with an army went to Bangor, and encouraged both Iago and Hywel to share the leadership of the realm. Asserting overall control however, Edgar confirmed liberties and endowments of the Bishop of Bangor, granting land and gifts. From 1284 until the 15th century, Bangor bishops were granted several charters permitting them to hold fairs and govern the settlement, later ones also confirming them as Lord of the Manor.
Bangor remained a small settlement until the start of the 18th century, when a political desire to enhance communications between England and Ireland via the London-Holyhead-Dublin corridor saw it designated as a post town in 1718. Growth was spurred by slate mining at nearby Bethesda, beginning in the 1770s by Richard Pennant, becoming one of the largest slate quarries in the world. The route between London and Holyhead was much improved by Thomas Telford building the A5 road, which runs through the centre of the city and over the Menai Suspension Bridge which was also completed by him in 1826. Bangor railway station opened in 1848.