 The first recorded reference to the town in 1161 is to a Norman motte and bailey castle at "Wristlesham" which was likely founded in the Erddig area around 1150 by Hugh de Avranches, earl of Chester.However, by the early 13th century Wrexham was undisputedly in the hands of the Welsh house of Powys Fadog.Stability under the princes of Powys enabled Wrexham to develop as a trading town and administrative centre of one of the two commotes making up the Lordship.