Lampeter ('læmpətər; Llanbedr Pont Steffan (formal); Llambed (colloquial)) is a town, community and electoral ward in Ceredigion, Wales, at the confluence of the Afon Dulas with the River Teifi. It is the third largest urban area in Ceredigion, after Aberystwyth and Cardigan, and has a campus of the University of Wales Trinity Saint David. At the 2011 Census, the population was 2,970. Lampeter is the smallest university town in the United Kingdom. The university adds approximately 1,000 people to the town's population during term time. The Welsh name of the town, Llanbedr Pont Steffan, means "Peter's church [at] Stephen's bridge" in reference to its church and castle. Its English name derives from this, as does the colloquial Welsh name Llambed. An alternative English spelling occurs as "Thlampetre" in 1433. The Norman timber castle of Pont Steffan ("Stephen's bridge" in English) occupying a strategic position beside the River Teifi was destroyed in 1187 after it had been conquered by Owain Gwynedd and was not rebuilt. Cardiganshire was one of the royal counties established by Edward I after the defeat of Llywelyn ap Gruffudd (Llywelyn Ein Llyw Olaf) at Cilmeri in 1282, when Lampeter fell under direct Royal Control. This, however, had little effect on the town and the Welsh language and culture continued to thrive. The first Borough Charter was granted in 1284 to Rhys ap Meredydd who was given the right to hold a weekly market. As many as eight fairs were also held each year under successive charters. The town was ruled by a local aristocracy who lived in elegant mansions, including Brynhywel, Maesyfelin and the Lloyd baronets of Peterwell. As magistrates, they handed out the severest of penalties to offenders. The fairs and markets had become rowdy occasions characterised by violence and drunkenness and the stocks and whipping post in front of Lampeter Town Hall were frequently put to use in the 18th century. The town developed the crafts, services and industries to cater to the needs of the rural area.