The first few years of Hammurabi's reign were quite peaceful. Hammurabi used his power to undertake a series of public works, including heightening the city walls for defensive purposes, and expanding the temples. In , the powerful kingdom of Elam, which straddled important trade routes across the Zagros Mountains, invaded the Mesopotamian plain. With allies among the plain states, Elam attacked and destroyed the kingdom of Eshnunna, destroying a number of cities and imposing its rule on portions of the plain for the first time.