Haydar was born in June–July 1459 in Amid (present-day
Diyarbakır) in the province of
Diyar Bakr to
Shaykh Junayd and
Khadija Begum, daughter of
Qara Othman and sister of
Uzun Hasan of the
Ak Koyunlu. His parents had married on the eve of Shaykh Junayd's invasion of
Trabzon. Less than a year later, Haydar's father was killed in the
Battle of Tabasaran. Apart from Haydar, the only sons of Junayd that had survived were
Khvajeh Mohammad Safavi and Khvajeh Jamshid Safavi. Haydar's only surviving sister, Shah-Pasha Khatun, was married off to Mohammad Beg Talish, a pivotal figure in the foundation of the Safavid dynasty in the early 16th century. In 1469-70, Haydar was installed in
Ardabil by his uncle
Uzun Hassan, who had defeated
Jahan Shah of
Kara Koyunlu dynasty at the
Battle of Chapakchur and established his own authority over its former domains. The
Safavid order's return to Ardabil prompted an influx of Haydar’s followers from northern Syria and eastern Anatolia to Ardabil to be beside him. Functioning as the "spiritual leader" of the order "
tariqa", Haydar would engage into various alliances with the leaders of the
Talish,
Shirvan and southern
Dagestan regions. Subsequently, he initiated three military campaigns against various rural areas and villages in the
Northern Caucasus. According to Prof.
Roger Savory, meant to drill his men, these raids targeted the "infidels" of
Circassia and
Dagestan. These were however probably the Christian
Alans (nowadays better known as
Ossetians) who roamed to the north of the
Darial Pass as well as the
Kabardian subgroup of
Circassians. In order to reach the area, Haydar had to cross areas ruled by the
Shirvanshah (specifically the Shirvanshah rulers of
Salyan and Mahmudabad), who were hostile as they were allied to the Ak Koyunlu ruler of
Azerbaijan, Sultan
Ya'qub. Therefore, Haydar ordered for the production of boats in
Khalkhal and
Astara, in order to avoid having to go by land. By using boats, Haydar and his men would be able to circumvent the Shirvanshahs, reaching
Derbent and coastal Dagestan through the
Caspian Sea. In particular, the towns of Agrica and Mian-Qeslaq seem to have been the main target at the time. In around 1473-3, Haydar and his men performed their first seaborne attack on Dagestan, during which they plundered the predominantly Circassian-inhabited town of Qaytaq as well as the Hamiri plain. Haydar's first mainland campaign in Dagestan happened five years later, in 1478. However, the third and final of his campaigns in Dagestan, which took place in 1488, proved to be his last. The Shirvanshah had allowed Haydar's first two campaigns, but this time, on his way to the North Caucasus, he sacked the city of
Shamakhi. In
Tabasaran, outside the Bayqird Castle, Haydar and his men were cornered; in the ensuing pitched battle, on 9 July 1488, they were killed by the combined forces of the Shirvanshah ruler
Farrukh Yassar and the Ak Koyunlu Sultan Ya'qub ibn Uzun Hassan. The Ak Koyunlu then ordered for the beheading of Haydar; they buried his severed head later on in
Tabriz. Haydar died not far from the location where his own father Junayd had died in 1460. Haydar's son, known regnally as
Ismail I, would later move his father's remains (which were thus located in both Tabriz as well as Tabasaran), and bury them inside the Safavid shrine located at
Ardabil. Haydar's tomb in Ardabil became a place of pilgrimage. ==Family==