By the 13th century Wales was divided between native Welsh principalities and the territories of the Anglo-Norman Marcher lords. The leading principality was Gwynedd whose princes had gained control of the greater part of the country, making the other remaining Welsh princes their vassals, and had taken the title Prince of Wales. Although English monarchs had made several attempts to seize control of the native Welsh territories, it was not until Edward's war of conquest against Llywelyn ap Gruffudd ("Llywelyn the Last") of 1277 to 1283 that this was achieved on a lasting basis.
In two campaigns, in 1277 and 1282/1283 respectively, Edward first significantly reduced the territory of the Principality of Wales and then completely overran it, as well as the other remaining Welsh principalities. Most of the conquered territory was retained as a royal fief, and these lands subsequently became, by custom, the territorial endowment of the heir to the English throne with the title Prince of Wales. The remainder would be granted to Edward's supporters as new Marcher lordships. Although the territories would not be effectively incorporated into the Kingdom of England until the Laws in Wales Acts 1535–1542, Edward's conquest marked the end of Welsh independence.
Following a series of invasions beginning shortly after their conquest of England in 1066, the Normans seized much of Wales and established quasi-independent Marcher lordships, owing allegiance to the English crown. However, Welsh principalities such as Gwynedd, Powys and Deheubarth survived and from the end of the 11th century, the Welsh began pushing back the Norman advance. Over the following century the Welsh recovery fluctuated and the English kings, notably Henry II, several times sought to conquer or establish suzerainty over the native Welsh principalities. Nevertheless, by the end of the 12th century the Marcher lordships were reduced to the south and south east of the country.
The principality of Gwynedd was the dominant power in Wales in the first half of the 13th century, with Powys and Deheubarth becoming tributary states. Gwynedd's princes now assumed the title "Prince of Wales". But war with England in 1241 and 1245, followed by a dynastic dispute in the succession to the throne, weakened Gwynedd and allowed Henry III to seize Perfeddwlad (also known as the "Four Cantrefs", the eastern part of the principality). However, from 1256 a resurgent Gwynedd under Llywelyn ap Gruffudd (who became known as "Llywelyn the Last") resumed the war with Henry and took back Perfeddwlad. By the Treaty of Montgomery of 1267, peace was restored and, in return for doing homage to the English king, Llywelyn was recognised as Prince of Wales and his re-conquest of Perfeddwlad was accepted by Henry. However, sporadic warfare between Llywelyn and some of the Marcher Lords, such as Gilbert de Clare, Roger Mortimer and Humphrey de Bohun continued.
Henry III died in 1272 and was succeeded by his son, Edward I. Whereas Henry's ineffectiveness had led to the collapse of royal authority in England during his reign, Edward was a vigorous and forceful ruler and an able military leader.