Pope Nicholas died on 22August 1280. Charles sent agents to Viterbo to promote the election of one of his supporters, taking advantage of the rift between the late Pope's relatives and other Italian cardinals. When a riot broke out in Viterbo, after the cardinals had not reached a decision for months, Charles' troops took control of the town. On 22February 1281 his staunchest supporter, Simon of Brie, was elected pope. Pope Martin IV dismissed his predecessor's relatives and made Charles the senator of Rome again. Guido I da Montefeltro rose up against the Pope, but Charles' troops under Jean d'Eppe stopped the spread of the rebellion at Forlì. Charles also sent an army to Piedmont, but Thomas I, Marquess of Saluzzo, annihilated it at Borgo San Dalmazzo in May.