Built in approximately 1140 in a spare , unornamented style that combines Frankish Romanesque with local traditions , the church was turned into an Islamic seminary after 1187 , when the Crusaders lost Jerusalem .
The Islam seminary became a church in 1187 .