Llywelyn continued his victorious career as long as war lasted. In 1266 he inflicted a crushing defeat on Mortimer at Brecon. In the autumn of next year, when peace had been established in England, he came to terms, through the mediation of the papal legate, in the Treaty of Montgomery. Llywelyn kept the four cantreds of the Middle Country; also Cydewain, Ceri, Gwerthrynion, Builth, and Brecon. But Maelienydd was restored to Roger Mortimer, though Llywelyn reserved his right to appeal to the law against this article. Further, the Prince of Gwynedd received the hereditary title of Prince of Wales, and was recognised as overlord of all the Welsh barons in Wales, except Meredydd ap Rhys, who remained immediate vassal of the King of England: his territories therefore in the Vale of Towy were withdrawn from the power of Llywelyn. The Prince of Wales in return did homage and agreed to pay him 25,000 marks by instalments. The treaty is less favourable to Llywelyn than that of 1265. His rights in Deheubarth were curtailed, and he gave up his claims to Ellesmere and Montgomery, and possession of Maelienydd.
The papal legate who arranged the treaty is not to be congratulated on his draftsmanship. Many things were left undecided, and a series of disputes arose. Thus Llywelyn seems to have claimed suzerainty over the Lord of Senghenydd as one of the "Welsh barons," though that term was surely only meant to include the Welsh barons who held directly of the king, not the vassals of the Lord of Glamorgan. But it is evident that Llywelyn did not try to abide by the treaty. He continued to intrigue with the English barons, posing as the successor of Simon de Montfort, and failing to see that Edward I. was the political heir of the great earl. He tried to throw off the suzerainty of England, with the result that he lost the independence of his country. He lived in an atmosphere of enthusiasm and flattery, and failed to realise the limits of his power. The bards by whom he was surrounded exercised a "highly pernicious influence in practical concerns," and ill-repaid his generosity by urging him to attempt the impossible.
"His bards are comely about his tables, I have seen him generously distributing his wealth, And his meadhorns filled with generous liquors. I never returned empty-handed from the North. The bards prophesy that he shall have the government and sovereign power; Every prediction is at last to be fulfilled."