Caravanserais were the ancient equivalent of the modern motor lodge - a place for travellers to rest and to stable, water and feed their camels. They were an essential part of the silk route trade that linked China with the west via Central Asia and the Middle East.
Shah Abbas wanted 999 rather than one thousand because the words 999 sounded much grander in Persian.
Although hundreds of the caravanserais have long disappeared, many still survive - some as abandoned ruins but others converted into everything from cinemas to restaurants and hotels.
The caravans of camels laden with their valuable cargos often numbered several hundred animals, along with their attendant merchants, guards and other travellers.
They'd be led by a caravan leader who'd also be accompanied by a mullah to provide spiritual services and an astronomer/navigator.
The latter was vital as often the caravans travelled in the cool of the night. The astronomer would use the stars to help keep the caravan on course and would be aided by the use of fires lit in the top of minarets - the lighthouses of the desert.
Caravanserais were situated a day's camel journey apart and usually shared some common features. There'd be one entrance, high windowless walls and even battlements and defence towers (raiding caravans could be a lucrative activity).
Above the main portal was usually a suite of rooms for the caravan leader and sometimes the caravanserai also had its own small mosque.
A well was essential and often there was a central platform for unloading and loading of camels. The animals were usually housed in a seperate stable.
Few of these are left now as, unlike the caravanserais themselves - which were made of stone or bricks - the stables were usually constructed from adobe.
Over several years of travelling in Iran I've explored dozens of caravanserais - all are subtly different.
Stand in an inner corridor beside the alcoves allocated to travellers and you can almost smell the woodsmoke of the cooking fires and hear the whispered conversations.
Caravanserais not only facilitated trade - they were the means by which religion, philosophies and good old gossip were transferred across the vast Asian continent.
The Zein-o-Din caravanserai near Yazd is one of rarest of Iranian caravanserais because rather than being the conventional square or rectangle it is round, with its curved walls further adorned with semi-circular towers. To one side stands another rarity - an adobe stable.
Built in the late 1500s, Zein-o-Din has now been lovingly restored and converted into a boutique hotel.
This time I was only visiting for lunch but on my previous visit I stayed a night in one of the original rooms used by the silk road traders. The ghosts of long-dead travellers hovered in the shadows.
Another stone alcove of the caravanserai had been turned into a teahouse, its floor covered in traditional hand-knotted carpets, with bolsters placed against the walls for tea-drinkers to lounge against.
Up on the flat roof I watched the sun set over the mountains, its rays bathing the adobe stable walls below in molten light.
A baby camel bellowed from within and along the highway its modern day equivalents rumbled into the night.