The first version of the Al-Aqsa Mosque was completed in 692 A.D., but was heavily damaged by an earthquake in 746, and then rebuilt. 1,2 It was decided to rebuild a less elongated version of the mosque, and the resulting structure is approximatedly the building that exists today.3
The Templars or Knights of the Temple received their name during the Crusades because they used the mosque as a palace, and Al-Aqsa is just a stones throw from the former site of the Jerusalem temple.4 The mosque still maintains a museum of Crusader weapons.
In 1187, Saladin recaptured Jerusalem from the Crusaders, and restored Al-Aqsa as a mosque. A nephew of Saladin built the porch with the seven arches in front of the northern facade in 1236.5
1 Victor Guérin, La Terre Sainte, Son Histoire, Ses Souvenirs, Ses Sites, Ses Monuments , (Paris, E. Plon, Nourrit, et Cie, 1884), 128
2 Mariam Shahin, Palestine, A Guide, (Northampton: Interlink Books, 2007), 314
3 Guérin, 128
4 Guérin, 128
5 Guérin, 128-129