Ancient Egypt was one of the earliest and most influential civilizations, located along the Nile River in Northeast Africa. For almost 30 centuries from its unification around 3100 BC until its conquest by Alexander the Great in 332 BC, Ancient Egypt was the preeminent civilization in the Mediterranean world. Ancient Egyptian history can be divided into eight distinct periods, including the Old Kingdom known for pyramid building, the Middle Kingdom considered Egypt's classical age, and the New Kingdom which saw Egypt's greatest expansion. Ancient Egyptian religion was polytheistic and centered around the king and gods, with religion playing an integral role in all aspects of Egyptian society.