Ancient Egypt was located along the fertile banks of the Nile River in northeast Africa. The Nile provided water for crops and was considered Egypt's "lifeline". Egyptian history is divided into the Old Kingdom, Middle Kingdom, and New Kingdom periods. Hieroglyphs were the written language of ancient Egypt and were used for over 3,500 years. Papyrus, made from reeds along the Nile, was invented by the Egyptians and was used to write important stories and documents. Religion played a major role in Egyptian society, and elaborate funeral practices like mummification were used to prepare people for the afterlife.