The Lombard kingdom proved to be more stable than its Ostrogothic predecessor, but in 774, on the pretext of defending the Papacy, it was conquered by the Franks under Charlemagne. They kept the Italo-Lombard realm separate from their own, but the kingdom shared in all the partitions, divisions, civil wars, and succession crises of the Carolingian Empire of which it became a part until, by the end of the ninth century, the Italian kingdom was an independent, but highly decentralised, state.