The origins of this mosque lie in the 8th century, but it burnt down and was rebuilt again in the 11th century during the Seljuk dynasty and went through remodeling many times.
Asal usul masjid ini sudah ada pada abad ke-8, namun dibakar dan dibangun kembali pada abad ke-11 semasa Dinasti Seljuk dan mengalami perubahan bentuk berkali-kali.