Carlisle (/kɑːrˈlaɪl/ kar-LYLE, locally /ˈkɑːrlaɪl/ KAR-lyle; from Cumbric: Caer Luel) is a city that lies within the Northern English county of Cumbria, 8 miles (13 km) south of the Scottish border at the confluence of the rivers Eden, Caldew and Petteril. It is the administrative centre of the City of Carlisle district which, (along with Cumbria County Council) will be replaced by Cumberland Council in April 2023. The city became an established settlement during the Roman Empire to serve forts on Hadrian's Wall. During the Middle Ages, the city was an important military stronghold due to its proximity to the Kingdom of Scotland. Carlisle Castle, still relatively intact, was built in 1092 by William Rufus, served as a prison for Mary, Queen of Scots in 1568 and now houses the Duke of Lancaster's Regiment and the Border Regiment Museum. In the early 12th century, Henry I allowed a priory to be built. The priory gained cathedral status with a diocese in 1133, the city status rules at the time meant the settlement became a city. From the 12th to the 19th centuries, there are many legends and folkloric stories on the Carle (a variant of the Old Norse word for "free man") of Carlisle and his castle. It was the main setting for the tale of Sir Gawain, a nephew of King Arthur, a legend from the Dark Ages. In the 19th century, the introduction of textile manufacture during the Industrial Revolution began a process of socioeconomic transformation in Carlisle, which developed into a densely populated mill town. This, combined with its strategic position, allowed for the development of Carlisle as an important railway town, with seven railway companies sharing Carlisle railway station. Nicknamed the 'Great Border City', Carlisle today is the main cultural, commercial and industrial centre in the Borderlands. It is home to the main campuses of the University of Cumbria and a variety of museums and heritage centres.