Qara Bayat Amirdom
The Khanate of Nishapur, 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 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 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. 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.