Following Lorenzo de' Medici's death in 1492, he was succeeded by his son Piero II. When the French king Charles VIII invaded northern Italy, Piero II chose to resist his army. But when he realised the size of the French army at the gates of Pisa, he had to accept the humiliating conditions of the French king. These made the Florentines rebel, and they expelled Piero II. With his exile in 1494, the first period of Medici rule ended with the restoration of a republican government.