From 3900 to 3100 B.C., the villages along the Nile valley grew in wealth and power. Two of these villages became particularly powerful and wealthy, so much so that it is not an exaggeration to think of them as cities. In the north, the city of Nekheb grew powerful, while in the south, Nekhen grew powerful. Around 3000 BC, the rivalry between these two towns erupted into war. Upper Egypt would emerge victorious in this war and dominate all of Egypt. We are told that this unification was brought about by the warrior-king Menes, whose name in Egyptian was Narmer. Of all the kings of Egypt, Narmer is among the most legendary; for according to Egyptians, he united the two parts of Egypt and became the first king of the Two Lands, Upper and Lower Egypt. The unification of Egypt, however, probably took a few generations. Whatever the truth, the history of Egyptian kings begins with Narmer (Menes) who founded the first dynasty of Egyptian kings. The symbol of this unification are the two crowns of Egypt, the white crown (Upper Egypt) and the red crown (Lower Egypt); these crowns would be combined to form the single crown of the king.
The unification of the two lands was the single most important event in Egyptian history. It allowed for a large, single government which then undertook massive administrative and building projects. Large-scale irrigation projects were begun as well as large-scale distribution of food and regulation of trade.
Egypt became very wealthy. The first kings of Egypt were so successful, that they could build expensive tombs for themselves; these tombs, called mastaba were dug into the ground and covered by a rectangular building. They were larger and wealthier than anything ever seen before.
At the same time, the Egyptians invented writing. Large-scale government and the need for record-keeping certainly motivated this invention. This early form of writing which took the form of pictures (pictographic writing) eventually developed into hieroglyphics or medu netcher ("words of the gods") in ancient Egyptian.
But perhaps the most important consequence of unification was the mix of government and religion. In order to legitimate the authority of the king, the early dynastic kings and their administrators invented an institution which was a much higher power than the individual king or his administrators. The king became a divine king, a living god incarnate in the king, who brought about fertility and life to the people he ruled. Egypt, then, was a theocratic ("theo"=god, "cratic"=ruled by) state. To question the authority of the king was blasphemy.