The mosque was originally a 13th-century Mamluk construction built in honour of one of Saladin's lieutenants who fought bravely against the Crusaders and died in a battle on the hill on which the mosque now stands. His shrine is now housed within the building.
Ephrat, Daphna (2009): The Shaykh, the Physical Setting and the Holy Site: the diffusion of the Qadiri path in late medieval Palestine. In JRAS (Journal of the Royal Asiatic Society), Series 3, 19, 1 (2009), pp. 1–20.