Bangor is a city and community in Gwynedd, northwest Wales. It is the oldest city in Wales, and one of the smallest cities in the United Kingdom. Historically in Caernarfonshire, it is a university city and one of only six places classed as a city in Wales, although it is only the 25th-largest urban area by population. 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.