Even while setting the administration of his kingdom in order, Edward was engaged in a war with Llewellyn, prince of Wales, who had refused at his bidding to do him homage. For many years the Welsh had maintained their independence, and had resisted all attempts of the English kings gs to incorporate their land with England. They had, in previous years, so threatened the western frontier that the great March earldoms of Chester, Pembroke, and Glamorgan had been erected to guard against Welsh invasion. The lords of these Marches, though vassals of the English king, were practically independent potentates. Llewellyn had incurred Edward's anger by aiding Simon de Montfort against Henry III. In 1277 Edward led an army across the border, and after a brief campaign in North Wales forced Llewellyn to a peace. But in 1282, incited and aided by his brother David, Llewellyn rose in revolt. Edward, who may have been waiting for him "to commit himself beyond forgiveness," gathered his forces, fleet and army, and after a difficult but vigorous campaign defeated the Welsh at Orewin Bridge. Llewellyn was slain; David soon after was captured, and finally executed as a traitor (1283-1284).
By the statute of Rhuddlan, Wales was divided into four shires and annexed to England. Anglesey was peopled with English farmers, and the shires were organized after the English model, though Edward wisely retained as the basis of his system the old tribal and feudal divisions of the land. In 1301 the title of Prince of Wales was given to Edward's son, though it carried with it no political power, and remained from that time forward simply the chief title conferred upon the heir-apparent to the English throne.
Edward's early work had been largely that of a reformer; but now, even while the Welsh war was in progress, he was establishing his greater claim to fame as a lawgiver. Many of the laws of this period are difficult for any except a trained lawyer to understand, but their general character can easily be stated.

England, Scotland and Wales at the Time of Edward I
