Yazid ibn Ahmad

Yazid ibn Ahmad or Yazid II (یزید) was the tenth Shirvanshah.

Reign
Yazid was second son of Shirvanshah Ahmad. He followed his brother Muhammad IV on throne of Shirvan c. November 991.

Relations with Christians
Yazid on the other hand, had to deal with Abd al-Barr b. Anbasah, former ruler of Qabala who used death of Muhammad to attack Shirvan in 992 in alliance with Shaki (probably Hereti or Kakheti). Battle was a disaster with 400 Shirvanese cavalries dead, with vizier Musaddin b. Habashi killed. Following this, Yazid focused on restructuring his army and entrusted this job to his new vizier Abd al-Aziz and Abd al-Samad, two sons of Abbas Bardawi in 998. Next year, he attacked Abd al-Barr and captured Gurzūl castle (modern Girdadul, Qabala) from him.

Relations with Emirate of Derbent
Yazid continued to intervene in Derbent affairs during his reign. After his accession, Maymun I attacked Bab al-Abwab and recaptured Emirate of Derbent which was under dominion of Shirvan during reign of Muhammad.

Later in 998/999, new emir Lashkari I (son of Maymun I) defeated Yazid who contested ownership of an estate near Derbent. Emir marched on Shabaran, however was defeated by Shirvan forces. Following the battle, captured brother of emir Abu Nasr was kept as hostage. Following a period of peace, Lashkari died in 1001/1002 and nobles of emirate asked for Abu Nasr to be succeeded. Yazid agreed to this on condition of marriage alliance and having suzerainty over Derbent, which was refused. Disagreement ended with execution of Abu Nasr.

New emir of Derbent, Mansur I continued war with Shirvan with varying degree of success until 1019 when a revolt in Derbent deposed Mansur in favor of Shirvanshah. This state of affairs lasted only until 1021 when Mansur recaptured the citadel with help of Sarir. Just 2 years later Mansur was deposed again but he managed to recapture the city after 20 days of siege in November 1024.

Yazid faced a revolt by saddlers' guild (سَرَّاج) in 1025.

Rebellion of Anushirvan
Yazid's son (also possibly his heir, since he was entrusted with governorship of Shamakhi) Anushirvan staged a palace coup in Shamakhi while he was away hunting in Gurzūl in 1025. Supported by locals, Anushirvan imprisoned his father's vizier Abd al-Aziz and looted his belongings. However his supporters soon changed sides and invited shah back to city. Anushirvan fled to nearby castle of Gulistan but was captured by freed vizier. Anushirvan died in prison not later.

Family and legacy
Yazid II was probably married to a daughter of a ruler of Shabaran who traced their descent from Sassanids. Most notably, starting after him Shirvanshahs took up Persian names and thus he is known as the progenitor of Kasranid branch of the dynasty. Yazid died in 1027 and was buried in Shabaran. He was succeeded by Manuchihr I. Two coins of him has been found and kept in Museum of History of Azerbaijan. These coins describe him with laqabs of al-Malik al-Muwaffaq al-Muzaffar Abu-Nasr.
 * 1) Anushirvan - rebelled, d. 1025.
 * 2) Manuchihr I (r. 1027 – 1034)
 * 3) Ali II (r. 1034 – 1043)
 * 4) Qubad (r. 1043 – 1049)
 * 5) Shamkuya (m. Abd al-Malik II of Derbent in December 1035, d. October 1067, Gulistan)
 * 6) Ahmad
 * 7) Ali III
 * 8) Sallar (r. 1050 – 1063)
 * 9) Mamlan ibn Yazid (k. by Fariburz I on 24 February 1067)