# Fariburz I

Fakhr al-Din Fariburz ibn Sallar (Persian: فریبرز بن سالار), better simply known as Fariburz I (فریبرز), was the sixteenth Shah of Shirvan, ruling from 1063 to 1096. His reign saw many major political balance changes in Caucasus, including expansion by the Seljuqs. He was considered a ruler with great diplomatic skills, and his kingdom extended from Mughan to Kumuk and Alania.

## Reign
### Clash with the Shaddadids

On 20 February 1063, Fariburz's father Sallar died, and thus Fariburz became the new ruler of Shirvan. Although he even already controlled most of the kingdom during his father's reign.
In March, the Shaddadid ruler Abu'l-Aswar Shavur I invaded his domains, captured the Quylamiyan castle, and then withdrew back to Arran. The reason for the attack was probably the fact that Fariburs gave refuge to Anushirvan ibn Lashkari, who was deposed by his great-uncle Abu'l-Aswar in 1049. However, some time later, he returned to Shirvan and once again began raiding it. The Shirvanians, who fought against him, were defeated and many of them were taken captive and had their riches taken. Shavur then marched towards the capital of Shirvan, Shamakhi.
There he seized many riches, captured the wife of Sallar, and then returned to Arran. On July, Shavur once again returned to Shirvan, where he had villages, crops, and houses destroyed. Fariburz, powerless to do anything, sent his son Afridun accompanied with Anushirvan to gain aid from the ruler of Sarir, whom Afridun was related to through his mother. However, the ruler of Sarir declined his request, and after three months, Afridun returned to Shirvan. In January 1064, Shavur invaded Shirvan for the fourth time, where he seized several towns, and forced Fariburz to pay him 40,000 dinars. On June 1064 (or July), Shavur restored Quylamiyan to Fariburz in return of extra 40,000 dinars.

### Hostilities with people of Derbent

In 1065, the people of Derbent revolted and killed its ruler, the Hashimid Mansur ibn Abd al-Malik. However, unfortunately for the rebels, Mansur was a cousin of Fariburz and had good relations with him, which made him raise an army and attack Derbent in order to avenge him, destroying many villages around the city. A battle shortly ensured at a bridge, which resulted in the defeat and massacre of the rebels. Fariburz then plundered Derbent and withdrew back to Shirvan.
Fariburz later returned to Derbent and began raiding around the city, encamping on the shores of Samur River. This hit the people of Derbent heavily, and forced them to free Fariburz's paternal aunt Shamkuya and pay tribute. This made a certain Mufarrij, who is called the "chief-of-chiefs of Derbent", request aid from the ruler of Sarir, who agreed to help him. Some time later, Mufarrij, with an army which included his own men and some Saririans, went forth to besiege the city of Shabaran, but was shortly defeated by Fariburz, who managed to capture him. The people of Derbent then finally surrender to Fariburz, who had the city rebuilt. On 30 January 1066, Fariburz appointed his son Afridun as the city's governor, who was warmly received by its people.

### Clash with the Turks

However, Fariburz soon faced problems with a rising power - the Turks, who had raided his domains and the territories of the Kurds, taking much booty. Fariburz tried to make the Turks leave by paying them, but this did not work, and the Turkic warlord Qara-tegin arrived to Shirvan for the second time, this time being followed by Fariburz's paternal uncle Mamlan ibn Yazid a claimant to throne of Shirvan. Qara-tegin shortly besieged Shamakhi and ravaged its surroundings, bringing great destruction, repeating the same in Baku. The situation became so hard that Fariburz had to send his studs to Masqat. In January 1067, for an unknown reason, Fariburz had some people from Shamakhi crucified, including his chamberlain (hajib) Lashkari ibn Rahman.
Meanwhile, Qara-tegin resumed his raiding in Shirvan moving from Baku to Shamakhi, destroyed many villages and towns, and kidnapped woman and children. He then laid siege to Shamakhi once again. The situation become more difficult for Fariburz when an army consisting of 2,000 Turkic troops arrived as reinforcements to Qara-tegin. These Turks shortly tried to trick Fariburz by sending him a message which said: "the Sultan has sent us to help thee and to drive Qara-tegin from thee". They then arrested Qara-tegin and Mamlan and asked Fariburz to come to them so that they could give him the prisoners. However, Fariburz did not fall for the bait and remained in his residence. The Turks then freed Qara-tegin and Mamlan and continued the siege of Shamakhi. Meanwhile, Fariburz secretly sent a messenger to the chamberlain of the Seljuq ruler Alp Arslan, who was the overlord of Qara-tegin and the Turks who had been raiding Caucasus.
The messenger gave 6,000 dinars to the chamberlain in return that he should give Mamlan to Fariburz, who wanted to kill him. The chamberlain then invited Mamlan to a festival, who accepted his invitation. During the festival, Mamlan got drunk and after he was permitted to leave, he got ambushed and killed by three of Fariburz's men, which included his cousin Lashkarsitan (apparently, a son of Abul Aswar), his servant Shad-tekin and his chamberlain Namdar ibn Muzaffar on 24 February 1067. The Turks then withdrew back to their territories, while Fariburz agreed to pay the Turks led by Erbasgan (or Elbasan, ruler of Qazvin and a brother-in-law of Alp Arslan) a yearly tribute of 30,000 dinars.
Bar Hebraeus mentions that a Shirvanshah trapped an Armenian patrician named Aristakes with 200 men in 1067 and delivered him to Alp Arslan, eventually forcing them to convert to Islam. Although Hebraeus doesn't mention Shirvanshah by name and oddly calls him a "Turkish emir" it was Fariburz who was active in this year.

### The rebellion of the son of Giorgi and the events that happened after

In April 1067, an unnamed son of a certain Giorgi, rebelled against Fariburz and captured the Daskarat al-Husayn castle, but after some time, ceded it to Aghsartan I, who was the ruler of Kakheti. Fariburz then marched towards the castle in order to recapture it, but was unable to and returned to Shamakhi. During the same year, Qara-tegin once again arrived to Shirvan, this time peacefully, and he was a given a daughter of Fariburz's uncle Qubad in marriage. On June, shah's cousin Lashkarsitan was killed near Qabala by some people from a place named Quni. In October, Fariburz's paternal aunt Shamkuya died in Gulustan castle and was buried next to her father in Shabaran.

### Dispute with Alp Arslan, the invasion of Qum and the revolt of Guzhdaham

During the end of the year of 1067, he submitted to the Seljuk ruler Alp Arslan who arrived in Arran. Later in 1068, Fariburz aided Alp Arslan during one of his campaigns. When Fariburz returned to Shirvan, he marched towards Quni, where he killed many of its people and ravaged the place in order to avenge Lashkarsitan. Some time later, when Alp Arslan returned from his campaigns against the Byzantine Empire, the inhabitants of Derbent objected to Alp Arslan about the capture of some of their chiefs by Fariburz. Alp Arslan ordered him to free them, which he did. Nevertheless, Alp Arslan had Fariburz imprisoned. Meanwhile, Qara-tegin fled from Shamakhi to Masqat but was killed there. Furthermore, the brother of Fariburz, Guzhdaham, fled to Lakz, carrying the tribute which Fariburz had to pay Alp Arslan. After some days, Fariburz was released and sent back to Shirvan, but had to in return pay a great amount of money. In July 1068, Fariburz's son Afridun, left Derbent and returned to Shirvan, presumably after the orders of sultan.
Some time later, Fariburz found out that Guzhdaham, who still carried the tribute he had to pay Alp Arslan, had left Lakz and arrived to Derbent, where he took refuge with the chiefs of the city. By November, Fariburz had raised an army and thereafter marched towards Derbent. A battle shortly ensured near the city which lasted a few hours and did neither of the sides were able to emerge victorious. Fariburz thus returned to his encampment, while the supporters of Guzhdaham returned to the city.
After some time, Fariburz once again attacked Guzhdaham and his supporters. During the battle, Mufarrij, who seems to have been freed and still served as the "chief-of-chiefs of Derbent", joined Fariburz. The forces of Fariburz almost managed to overcome the forces of Guzhdaham, but due to the bravery of some of Guzhdaham's men who were from Kaitag and Tawig, Fariburz was in the end defeated. However, some time later, Mufarrij managed to seize some parts of Derbent and after much fighting, managed to seize all of Derbent, while Guzhdaham fled to Lakz. Fariburz, along with his son Afridun, then went to Derbent, and after four days he returned to Shirvan, while Afridun was once again appointed as the governor of the city.

### The loss of Derbent, the accession of Malik-Shah I, the Shaddadid-Shirvanian alliance and the invasion of Arghar

Fariburz raided Arran using the opportunity of Ashot ibn Shavur ruling as regent in name of his brother Fadl II in 1068. However, as soon as Fadl was released, he made a counter-attack on Shirvan and even managed to a khutbah to be read in his name in Derbent.
In November 1071, Alp Arslan appointed his commander Yaghma as the governor of Derbent. When Yaghma arrived to the city, he read the letter which stated that he was appointed by the Seljuq ruler to rule Derbent, and thus Fariburz was unable to do anything; he evacuated his son and men out of the city. Furthermore, Yaghma also demanded Fariburz to cede Masqat, which he also did. During the same year, Guzhdaham died in Shaki and was buried in Shamakhi.
In 1072, Fariburz made a peace with Fadl II, whom he along with destroyed the castle of Malugh, which had earlier been captured by Aghsartan I. On 15 December, Alp Arslan died, and after a brief dynastic war, he was succeeded by his son Malik-Shah I.
In 1074, a force of Turkic warriors under another Turkic warlord named Arghar ibn Buqa, arrived to Shirvan. The latter claimed that Malik-Shah had given him Shirvan as a part of his own domains. Fariburz, however, tricked him by giving gifts and money, which made Arghar feel comfort with him. Unexpectedly, Fariburz suddenly had him imprisoned, but later changed his mind due to his fear of Malik-Shah; he freed Arghar with his own hands, made a pretext and gave him gifts once again. Arghar then falsely acted that he had pardoned and fled from his court, raised an army and invaded Shirvan, where he ravaged the country, but in the end was forced by Malik-Shah to restore what he had destroyed, which he did in 1075. During the same year, Fariburz conquered most of Lakz country.
Another contingent of Turks arrived under leadership of Savtegin in 1075, who was sent by Malikshah. Fariburz was forced to cede Derbent again, fearing the fate of Fadl III, whose territories were directly annexed by the commander.

## Later reign

Although Fariburz was during his late reign a nominal vassal of Seljuqs, he minted his coins in his own name including laqab al-Malik al-Adil Abu-Shuja and mentioning the Seljuk sultan and caliph al-Muqtadi as well. Muhammad Mosque in Baku was built during his reign, in 1078/9. Fariburz died in c. 1096 and was succeeded by his son Manuchihr II.

## Legacy

According to the Persian medieval poet Khaqani, Fariburz was the first Shirvanshah ever to make a pilgrimage to Mecca. His vizier was a Daylamite named Baha al-Din Muhammad b. Hussayn al-Kakuyi, whose family was descended from the military leader Makan ibn Kaki and held the vizier office for several centuries and for whom Masud ibn Namdar was working for in Baylaqan. Masud credited Fariburz with conversion of Kumyks to Islam via Lezgis.