Pope Gregory X died on 10January 1276. After the hostility he experienced during Gregory's pontificate, Charles was determined to secure the election of a pope willing to support his plans. Gregory's successor, Pope Innocent V, had always been Charles' partisan and he rapidly confirmed Charles as senator of Rome and imperial vicar of Tuscany. He also mediated a peace treaty between Charles and Genoa, which was signed in Rome on 22June 1276. Charles restored the privileges of the Genoese merchants and renounced his conquests, and the Genoese acknowledged his rule in Ventimiglia.