The city of Mapayan had been abandoned for a while by the time the Spanish showed up and the kingdoms of the Yucatan were bitterly divided in a feud between a few factions, primarily the royal houses of the Cocoms, who had ruled Mayapan, and the Tutul Xius, who had overthrown them and destroyed the League. The Spanish took advantage of these feuds and eventually allied with the Xiu. They never really conceived themselves as a single nation at the time, at most the League of Mayapan was like the Holy Roman Empire, a confederation more or less of peoples who spoke similar dialects but tended to think of themselves as distinct nations. Pan-Maya sentiment would only come about in the Colonial period.