At first sight the construction appears to be a fortified castle, but in fact it was a palace used as a caravan station, built in 710 -715 AD during the reign of Al Waleed bin Abdelmalik. The palace consisted of two storeys; they used the lower one as stables for horses, camels and other animals, while the upper storey contained housing units for the traders. The total number of all the rooms in both storeys was 61: the lower had 25 and the upper 36.