The temple built by Amenhotep III was dedicated principally to the Nuibian form of the God Horus, and later, apparently during the time of Ramesses II, to Amun. It was damaged during the Amarna Period, but later restored by Ramesses II.
The temple that was actually built on the orders of Ramesses II, utilizing at least some Libyan captives sometime around his 44th year as king, was dedicated to Amun-Re and Re-Horakhty. It was the third speos style temple that Ramesses II built in Nubia, the most famous of which is of course at Abu Simbel. The temple sphinx-lined approach in the two forecourts leading to the initial stairway provides the name of this area, which is known as the Valley of the Lions (Arabic Wadi al Sabua). The entire complex that proceeds the rock hewn chambers was enclosed within a huge brick wall over a meter thick on a rectangular plan measuring 35 by 80 meters, with buttresses on the north and south external sides.