Constitutional and hereditary monarchy with an Emperor These were the two periods known as the First and Second Mexican Empires. Mexico had claimed independence from Spain in 1821.