At about the same time that Sumerian city-states expanded and fought with one another in the Tigris and Euphrates Valleys, a more cohesive state under a single ruler grew in the valley of the Nile River in North Africa. This was Egypt, which for long stretches of history was prosperous and secure behind desert areas on both sides of the Nile Valley. At various times groups migrated into Egypt seeking better lives or invaded and conquered Egypt. Often these newcomers adopted aspects of Egyptian religion, art, and politics, and the Egyptians also carried their traditions with them when they established an empire and engaged in trade.