The building, which was built as an inn(khan) in the 13th century for the accommodation of those outside the city walls, was converted into a mosque when the city overflowed the walls. The building is a rectangular inn without a courtyard, leaning against the city walls from the southwest. There are two sarcophagi inside the cupola, which is dated to 1188.
The low arched door of the inn opens to the middle part of it. When the mihrab of the mosque was replaced, this door was later closed forever.