In 1221 Llywelyn took control of neighbouring Meirionnydd from his son, Gruffydd; Llywelyn had previously placed Gruffydd in power there, but the father and son had fallen out. The prince then began to build the castle of Castell y Bere with the intent of controlling the local population and securing his new south-west border, which included the mountain trade routes between Gwynedd, Powys Wenwynwyn and Deheubarth. Castell y Bere was the first of several stone castles built by Llywelyn and the initial castle consisted of several towers positioned around a courtyard, situated on a rocky hillock in the Dysynni Valley near Cadair Idris.