The Nile River was vital to ancient Egyptian civilization. It provided water for irrigation, transportation, and drinking. Egyptians developed successful farming along the Nile using irrigation techniques and the rich soil left behind after annual floods. They grew crops like wheat and barley. Egypt was unified under King Narmer around 3100 BC and was then ruled by dynasties of pharaohs for almost 3000 years. Pharaohs led Egypt as both political and religious leaders. Egyptians built large pyramids to serve as tombs for pharaohs and protect their bodies for the afterlife.