Although possibly 9th-century in origin, the main core of Qa'en's bulky central mosque predominantly dates from a 1394 rebuild funded by a Timurid commander. The hollow, central, summer section is decorated in chequered white-and-sepia detail; the mihrab, added later, was angled to compensate for the discovery that the builders had misaligned the mosque several degrees away from the true direction of Mecca.
The sundial in the caravanserai-style courtyard was restored in 1951.