A second cousin and brother-in-law of both Muhammad V and Ismail II, he led a coup that deposed the former and enthroned the latter in August 1359. He increasingly held the power of government during Ismail's rule, and in June or July 1360 he had the new Sultan killed and took the throne to himself. Muslim chronicles portrayed him negatively, describing him as a tyrannical ruler with coarse manners. In October 1360, he allied himself with Peter IV of Aragon against Peter I of Castile in the War of the Two Peters, but had to face Castile alone when Aragon agreed to a separate peace in May 1361. Castile allied itself with Muhammad V who returned from exile in August. The war against this coalition began with partial successes for Muhammad VI, but from February 1362 onwards Peter I and Muhammad V won a string of major victories. On 13 April Muhammad VI fled Granada, allowing his rival to retake the throne. The desperate Muhammad VI then unexpectedly surrendered himself to Peter I in Seville. However, the Castilian king—still outraged at his previous alliance with Aragon—personally killed him with a lance on 27 April and sent his severed head to Granada.