The Nile was also an important part of ancient Egyptian spiritual life. Hapi was the god of the annual floods, and both he and the pharaoh were thought to control the flooding. The Nile was considered to be a causeway from life to death and the afterlife.