is a city in and capital of the Bastam District of Shahrud County, Semnan Province, in Iran.
There is a saying that the town was founded by Vistahm, uncle of the Sasanian king Khosrau II
Bastam was founded in the 6th century in the Greater Khorasan. It is 6 kilometres (3.7 mi) north of Shahrud. The town is known for its Islamic monuments from the Ilkhanid period and its association with the mystic Bayazid Bastami.
Abū Yazīd Ṭayfūr b. ʿĪsā b. Surūshān al-Bisṭāmī (al-Basṭāmī), commonly known in the Iranian community as Bāyazīd Bisṭāmī, who was a Persian Sufi, from north-central Iran. Also known to Sufis as Sultān-ul-Ārifīn "King of the Gnostics", Bastami, who was famous for "the boldness of his expression of the mystic’s complete absorption into the God head, was one of the pioneers of what later came to be known as the "ecstatic" (sukr) school of Islamic mysticism. His grandfather Surūshān was born a Zoroastrian, an indication that Bastami had Persian origins despite the fact that his transmitted sayings are in Arabic. Very little is known about the life of Bastami, whose importance lies in his biographical tradition, since he left no written works. The early biographical reports portray him as a wanderer but also as leading teaching circles. They describe him as a mystic dismissive of excessive asceticism but also as one scrupulous about ritual purity such as washing his tongue before chanting God’s names and one appreciative of the work of the great jurists. A measure of the influence of his image in posterity is the fact that he is named in the lineage (silsila) of one of the largest Sufi brotherhoods today, the Naqshbandi order.