Original sentence: After the conquest of the Kingdom of Valencia by Jaime I of Aragon, Al-Azraq signed the Al-Azraq Treaty of 1245 , a pact with the Aragonese king by which the Muslim commander could keep control of a series of fortifications in the valleys of Alcalá and Gallinera.As a vassal in the Christian kingdom he spent long seasons in the courts of Aragon, Valencia and Granada, on friendly terms with the kings from Aragon and of Castile.Finally in 1276 he met his death while he was besieging Alcoy, at the hands of a Christian native from Játiva.Nevertheless, Al-Azraq led uprisings in 1248 and 1258, when he made an attempt on the life of Jaime I but was defeated
Edited sentence: After the conquest of the Kingdom of Valencia by Jaime I of Aragon, Al-Azraq signed the generous Al-Azraq Treaty of 1245 , a pact with the Aragonese king by which the Muslim commander could keep control of a series of fortifications in the valleys of Alcalá and Gallinera.Al-Azraq betrayed the treaty in  1248 and 1258, when he made an attempt on Jaime I life but was defeated.As a vassal in the Christian Kingdom he spent long seasons in the courts of Aragon, Valencia and Granada pretending friendship with the kings from Aragon and of Castile.Finally in 1276 the treacherous Arab commander met his death he was sieging Alcoy at the hands of a Christian native from Játiva