The Mayan city of Chichen Itza.

The Classic Maya were a thriving civilization that had complex writing systems, advanced calendars, and awe-inspiring architecture including massive pyramids. Dozens of unique stone cities dotted Middle America, housing a diverse and complicated people.

But after roughly 500 years, the civilization of various city states gradually tore apart, through wars and atrocities. By the beginning of the 10th century A.D., the Maya were left scattered across a ruined landscape.

The wars and conflicts grew over the course of half a millennia, due to rising temperatures from climate change, according to a new study by a trio of archaeologists from Simon Fraser University in British Columbia.

Traditional thought on the Maya indicated that a lack of rainfall caused massive crop failures, prompting wars of conquest and chaos.

The latest study, in the Quaternary Science Reviews, instead indicates temperatures were the driving force in the societal collapse, according to the study.

From the years 350 A.D. through roughly 900 A.D., average daily temperature kept climbing. Accordingly, the number of wars and conflicts found by the Simon Fraser team escalated into a near-constant storm of violence. What was an infrequent pace of up to three wars per quarter century early in the Classic period grew to a fever pitch with two dozen or more conflicts per 25 years by the end of the period – roughly one war a year, they write.

Psychological effects could have played a part – with scorching temperatures, the Maya in the various competing city states could have become more “bellicose,” the researchers told Seeker.

But the more likely tangible explanation is that the staple crop of maize was burned-out by the hotter climate, which reached above an average year-round of 86 degrees Fahrenheit by the end of the Classic Maya.

The temperatures may have increased partly due to large-scale deforestation around Mayan cities, which reduced soil moisture availability, thereby boosting regional temperatures even beyond the natural threshold.

The maize crops thus failed, creating food shortages. The wars were sparked by leaders who wanted to maintain local support by distracting from their domestic shortfalls, the researchers told Seeker.

Climate change could a matter of paramount national security in the 21st century and beyond, the U.S. Department of Defense found in a report in July 2015. Chaos from political, economic and military stress caused by changes to the world’s sea levels and food and water availability could be in the offing, the military found. The report cited the lessons of Syria: severe and long-lasting droughts in that nation between 2006 and 2011 caused crops to fail, people to flee to the cities, which were then overcrowded and hard to control. The domino-like effect threw the region into chaos leading to the rise of ISIS, the DOD concluded.

“DoD recognizes the reality of climate change and the significant risk it poses to U.S. interests globally,” contends the report. “Climate change is an urgent and growing threat to our national security, contributing to increased natural disasters, refugee flows and conflicts over basic resources such as food and water.