The region around Mazar-i-Sharif has been historically part of Greater Khorasan and was controlled by the Tahirids followed by the Saffarids, Samanids, Ghaznavids, Ghurids, Ilkhanates, Timurids, and Khanate of Bukhara. According to tradition, the city of Mazar-i-Sharif owes its existence to a dream. At the beginning of the 12th century, a local mullah had a dream in which the 7th century Ali ibn Abi Talib, cousin and son-in-law of Muhammad, appeared to reveal that he had been secretly buried near the city of Balkh.