Treaty of Gwerneigron

The Treaty of Gwerneigron was a peace treaty signed by Henry III, king of England and Dafydd ap Llywelyn, prince of Wales of the House of Gwynedd, on 29 August 1241. The treaty brought to an end Henry's invasion of Wales begun earlier that month. 
In it, and the Treaty of London which followed in October, Dafydd agreed to cede large parts of modern-day Flintshire to Henry. The treaty also obliged Dafydd to hand over his half-brother, Gruffudd ap Llywelyn Fawr, to Henry, who promptly imprisoned him in the Tower of London. Given that Gruffudd was a rival claimant to Dafydd's princeship, Henry reasoned that Dafydd's authority could be curbed by the ever-present threat that Gruffudd might be released and sent to Wales to undermine Dafydd's position. Dafydd promised his and his own heirs' loyalty to kings of England so that in the event of breach he would forfeit all the remaining lands to the king. The king also became Dafydd's heir in case the latter died without living offspring.
The treaty effectively prevented Dafydd from pressing his rights to the territories controlled by his father Llywelyn until Gruffudd's death during an escape attempt on 1 March 1244, after which Dafydd invaded Flintshire and recovered his lost territory.