troops as necessity required . Historian David P. Chandler has described the relationship between the monarch and the military: Though the king, who led his country into battle, sometimes engaged his chief enemy in single combat, Khmer military strength rested on the junior officers, the captains of militia. These men commanded the loyalty of peasant groups in their particular locality. If the king conquered a region, a new captain of militia would be enrolled and put under an oath of allegiance. The captains were simply headmen of the outlying regions, but their connection with the king enhanced their status. In time of war they were expected to conscript the peasants in their district and to lead them to Angkor to join the Khmer army. If the captains disobeyed the king they were put to death. The vast majority of the Khmer population were of the farmer-builder-soldier class. Little is known conclusively about warfare during imperial Cambodia, but much has been assumed from the environment or deduced from epigraphic and sculptural evidence. The army was made up of peasant levies, and because the society relied on rice cultivation, Khmer military campaigns were probably confined to the dry season when peasant-soldiers could be spared from the rice fields. Battles were fought on hard-baked plains from which the paddy (or rice) had been harvested. Tactics were uncomplicated. The Khmer engaged their foes in pitched frontal assaults, while trying to keep the sun at their backs. War elephants were widely employed, for both tactical and logistical purposes. Late in the Khmer Empire, the ballista (a kind of catapult, often shaped like a giant crossbow) took its place in regional warfare. It probably was introduced to the Cambodians by Cham mercenaries, who had copied it earlier from Chinese models. Throughout the empire’s history, the court was repeatedly concerned with quelling rebellions initiated by ambitious nobles trying to achieve independence, or fighting conspiracies against the king. This was particularly true each time a king died, as successions were usually contested. The Khmer Empire's principal adversaries were the Cham of the powerful kingdom of Champa in modern central Vietnam and to a lesser extent the Pagan Kingdom to the west. Warfare was endemic and military campaigns occurred continuously. The Chams attacked by land in 1177 and again by water in 1178, sacked Angkor twice. The empire quickly recovered, capable to strike back, as it was the case