# Qara Bayat Amirdom

The Khanate of Nishapur (Persian: خان‌نشین نیشابور), also known as the Qara Bayat Amirdom (امیرنشین قره‌ بیات‎), was a semi-independent state ruled by the Bayat tribe that existed in Khorasan from 1747 to 1800, whose capital was in the city of Nishapur.

## History
### Safavid Origins

The Qara Bayat tribe was traditionally settled around Nishapur and were traditionally governors of the region all the way up to the Qajar Era. During Shah Ismail's campaign to Khorasan in 1510 the tribal leaders had submitted to him. Due to their heavy resistance against Uzbek incursions, Mohammad Khodabanda had exempted the tribe from taxes. During the reign of Shah Abbas, the tribe's emir (Mohammad Sultan Bayat) was appointed governor of Esfarayen, Nishapur, and Sabzevar. During the Afghan invasion, the Qara Bayat emir had submitted to Malek Mahmoud Sistani but later rebelled against him and was executed.

### Founding

In 1747, the Nishapur Khanate was founded by Ahmad Khan after the collapse of the Afsharids with the support of 10,000 Bayat families. On October 1, 1748, the Bayats were among the tribal leaders who installed Shahrokh Shah as the leader of Khorasan and expelled Ebrahim Mirza Afshar. When Shahrokh Shah was deposed on January 14, 1750, by Mir Sayyed Mohammad, Ahmad Khan was appointed commander of the Turkmen tribal cavalry. Sometime later though Ahmad Khan was murdered by Abbas Qoli Khan, who gained control of the Amirdom. When Shahrokh Shah was re-installed on March 20, Khorasan disintegrated into tribalism as various tribal leaders fought over control of Khorasan.

### Invasion of the Afghans

Ahmad Shah Durrani used this vacuum of power to re-conquer Herat and besiege Mashhad in July 1750. Ahmad Shah eventually gave up the siege of Mashhad on November 10 though and moved on to besieging Nishapur. However, the Afghan forces suffered heavy casualties (many Afghan troops froze to death) and were forced to retreat in the winter of 1751. With this, the tribal leaders went back to fighting with one another. Eventually one Mir Alam Khan Khozeimeh triumphed over all other factions, including the Kurds of Khabushan and the Jalayir of Kalat-i Naderi.
In 1754, Mir Alam Khan Khozeimeh besieged Nishapur because Abbas Qoli Khan had refused to submit. However, Ahmad Shah Durrani invaded Khorasan again, defeating Mir Alam Khan at Jam and taking Tun in June 1754. (The Encyclopedia Iranica article on the Afsharids mentions that in the spring of 1754 Nishapur was unsuccessfully besieged by the Afghans but this has not been corroborated by other sources.) On July 23 Mashhad was besieged by the Afghans, and during the five month long siege the population of Sabzevar handed Mir Alam Khan over to the Afghans who was then executed. On December 1 or December 2 the city fell to the Afghans, and in the summer of 1755 Ahmad Shah Durrani moved against Nishapur.
When the Afghans appeared before Nishapur on June 17, 1755, Abbas Qoli Khan submitted to the Afghans. However, news reached that Qajar forces had defeated an Afghan force at Mazinan soon after. As a result, the Nishapuris were encouraged to resist the Afghans, and a 7-day battle ensued. When Nishapur finally fell to the Afghans on June 24, the city was destroyed and its infrastructure torn apart under the orders of Ahmad Shah. However, he was impressed with the resistance of the Bayats and reportedly settled some back in Afghanistan as he was leaving Khorasan.

### Remainder of Abbas Qoli Khan's reign

Ahmad Shah dragged Abbas Qoli Khan to Kabul, but he gained the favour of the Afghan. Ahmad Shah married Abbas's sister and Ahmad Shah's daughter was given to his son. Eventually Abbas Qoli Khan returned to Nishapur and, according to Malcolm: "devoted the remainder of his life to improving that town, and the districts dependent upon it". Abbas Qoli Khan was a just and humane ruler, and it seemed like for the rest of his reign there were no major political events effecting Nishapur. The only exception is in 1768–69. Nasrullah Mirza Afshar, one son of Shahrokh Shah, had seized control of Mashhad from his brother, Nader Mirza Afshar. He then besieged Nishapur because Abbas Qoli Khan refused to submit. However, Nader Mirza Afshar used this opportunity to besiege Mashhad. As a result, Nasrullah Mirza abandoned the siege of Nishapur and raced back to Mashhad and expelled Nader Mirza.

### Reign of Jafar Qoli Khan

When Abbas Qoli Khan died, a succession crisis brewed. Abbas Qoli Khan had eight sons (only two of those are mentioned in the subsequent struggles), and the eldest was regarded as incompetent. Therefore, his second son, Ali Qoli Khan, took control of the government. However, his claims were disputed by Abbas's brother Jafar Qoli Khan and after a short struggle Jafar Qoli Khan blinded Ali Qoli Khan and became the new Amir. He wasn't very popular among the commoners, who awaited a chance to be liberated. That chance would come when Agha Mohammad Khan Qajar invaded Khorasan in 1796.

### Conquest by the Qajars

In 1800, the Qajars conquered the Amirdom. However, Bayat tribesmen were still involved in the administration of Nishapur. During the Revolt of Hasan Khan Salar, one Imamverdi Khan Bayat was the governor of Nishapur and defended it from Hasan Khan Salar's forces.