Elder. In November 1276, Edward declared war. Initial operations were launched under the captaincy of Mortimer, Edward's brother Edmund, Earl of Lancaster, and William de Beauchamp, 9th Earl of Warwick. Support for Llywelyn was weak among his own countrymen. In July 1277 Edward invaded with a force of 15,500, of whom 9,000 were Welshmen. The campaign never came to a major battle, and Llywelyn soon realised he had no choice but to surrender. By the Treaty of Aberconwy in November 1277, he was left only with the land of Gwynedd, though he was allowed to retain the title of Prince of Wales. When war broke out again in 1282, it was an entirely different undertaking. For the Welsh, this war was over national identity, enjoying wide support, provoked particularly by attempts to impose English law on Welsh subjects. For Edward, it became a war of conquest rather than simply a punitive expedition, like the former campaign. The war started with a rebellion by Dafydd, who was discontented with the reward he had received from Edward in 1277. Llywelyn and other Welsh chieftains soon joined in, and initially the Welsh experienced military success. In June, Gloucester was defeated at the Battle of Llandeilo Fawr. On 6 November, while John Peckham, Archbishop of Canterbury, was conducting peace negotiations, Edward's commander of Anglesey, Luke de Tany, decided to carry out a surprise attack. A pontoon bridge had been built to the mainland, but shortly after Tany and his men crossed over, they were ambushed by the Welsh and suffered heavy losses at the Battle of Moel-y-don. The Welsh advances ended on 11 December, when Llywelyn was lured into a trap and killed at the Battle of Orewin Bridge. The conquest of Gwynedd was complete with the capture in June 1283 of Dafydd, who was taken to Shrewsbury and executed as a traitor the following autumn; Edward ordered Dafydd's head to be publicly exhibited on London Bridge. Further rebellions occurred in 1287–88 and, more seriously, in 1294, under the leadership of Madog ap Llywelyn, a distant relative of Llywelyn ap Gruffudd. This last conflict demanded the King's own attention, but in both cases the rebellions were put down. By the 1284 Statute of Rhuddlan, the principality of Wales was incorporated into England and was given an administrative system like the English, with counties policed by sheriffs. English law was introduced in criminal cases, though