Ur-Nammu (or Ur-Namma, Ur-Engur, Ur-Gur, Sumerian: 𒌨𒀭𒇉, ca. 2047-2030 BC short chronology) founded the Sumerian Third Dynasty of Ur, in southern Mesopotamia, following several centuries of Akkadian and Gutian rule. His main achievement was state-building, and Ur-Nammu is chiefly remembered today for his legal code, the Code of Ur-Nammu, the oldest known surviving example in the world.
According to the Sumerian King List, Ur-Nammu reigned for 18 years. Year-names are known for 17 of these years, but their order is uncertain. One year-name of his reign records the devastation of Gutium , while two years seem to commemorate his legal reforms ("Year in which Ur-Nammu the king put in order the ways (of the people in the country) from below to above", "Year Ur-Nammu made justice in the land").
Among his military exploits were the conquest of Lagash and the defeat of his former masters at Uruk. He was eventually recognized as a significant regional ruler (of Ur, Eridu, and Uruk) at a coronation in Nippur, and is believed to have constructed buildings at Nippur, Larsa, Kish, Adab, and Umma. He was known for restoring the roads and general order after the Gutian period.
He was killed in a battle against the Gutians after he had been abandoned by his army. He was deified, and succeeded by his son Shulgi. His death in battle was commemorated in a long Sumerian poetic composition.