Finally, the Pope brought about reconciliation between Juan Manuel and Alfonso XI. This reconciliation was not complete until 1340, when Juan Manuel and Alfonso allied against the Muslims in the Battle of Río Salado, taking the city of Algeciras. After these events, Juan Manuel left political life and retired to Murcia, where he spent his last years focused on literature. Proud of his works, he decided to compile them all in a single volume. This compilation was destroyed in a fire, with no known copy preserved.