However, from the fourteenth century on, civil wars became more frequent as rulers were unable to deal with other, structural problems: rice cultivation declined due to a cooling of temperature, the conversion from Hinduism to Theravada Buddhism undermined the legitimacy of kings as divine ruler, and warfare with the Siamese resulted in a continuous loss of territory.