When the Crusaders captured Jerusalem in 1099, they used the mosque as a palace and the Dome of the Rock as a church.