In 969 AD, the Fatimids built a new capital for Egypt and the new city became Egypt's capital ever since. In 988 AD, El Azhar was erected and gained through ages, importance and effectiveness. Walls and gates that witnessed many important events throughout history surrounded Cairo then.