The Durrani Empire (Pashto: د درانیانو واکمني), also called the Afghan Empire, was founded and built by Ahmad Shah Durrani with its capitals at Kandahar, Afghanistan, and Peshawar, Pakistan. At its maximum extent, the empire covered the nearly-entire modern states of Afghanistan and Pakistan, as well as some parts of northeastern Iran, eastern Turkmenistan, northwestern India including the Kashmir region.
After the death of Nader Shah in 1747, the region of Kandahar was claimed by Ahmad Shah Durrani. From there he began conquering Ghazni followed by Kabul. In 1749 the Mughal ruler had ceded sovereignty over what is now Pakistan and northwestern Punjab to the Afghans. Ahmad Shah then set out westward to take possession of Herat, which was ruled by Shahrokh Shah. He next sent an army to subdue the areas north of the Hindu Kush and in short order all the different tribes began joining his cause. Ahmad Shah and his forces invaded India four times, taking control of the Kashmir and the Punjab region. Early in 1757, he sacked Delhi, but permitted the Mughal dynasty to remain in nominal control as long as the ruler acknowledged Ahmad Shah's suzerainty over the Punjab, Sindh, and Kashmir. Durrani's forces instigated the Vaḍḍā Ghallūghārā when they killed thousands of Sikhs in the Punjab.
After the death of Ahmad Shah in about 1772, his son Timur Shah became the next ruler of the Durrani dynasty who decided to make Kabul the new capital of the empire, and used Peshawar as the winter capital. The Durrani Empire is considered the foundation of the modern state of Afghanistan, and Pakistan. with Ahmad Shah Durrani being credited as "Father of the Nation".
In 1709 Mir Wais Hotak, chief of the Ghilji tribe of Kandahar Province, gained independence from the Safavid Persians. From 1722 to 1725, his son Mahmud Hotak briefly ruled large parts of Iran and declared himself as Shah of Persia. However, the Hotak dynasty came to a complete end in 1738 after being toppled and banished by the Afsharids who were led by Nader Shah Afshar of Persia.
The year 1747 marks the definitive appearance of an Afghan political entity independent of both the Persian and Mughal empires. In October 1747 a loya jirga (grand council) concluded near the city of Kandahar with Ahmad Shah Durrani being selected as the new leader of the Afghans, thus the Durrani dynasty was founded. Despite being younger than the other contenders, Ahmad Shah had several overriding factors in his favor. He belonged to a respectable family of political background, especially since his father served as Governor of Herat who died in a battle defending the Afghans.
One of Ahmad Shah's first military action was the capture Ghazni from the Ghiljis, and then wresting Kabul from the local ruler. In 1749, the Mughal ruler was induced to cede Sindh, the Punjab region and the important trans Indus River to Ahmad Shah in order to save his capital from Afghan attack. Having thus gained substantial territories to the east without a fight, Ahmad Shah turned westward to take possession of Herat, which was ruled by Nader Shah Afshar's grandson, Shahrukh Afshar. Ahmad Shah next sent an army to subdue the areas north of the Hindu Kush mountains. In short order, the powerful army brought under its control the Tajik, Hazara, Uzbek, Turkmen, and other tribes of northern Afghanistan. Ahmad Shah invaded the remnants of the Mughal Empire a third time, and then a fourth, consolidating control over the Kashmir and Punjab regions, with Lahore being governed by Afghans. He sacked Delhi in 1757 but permitted the Mughal dynasty to remain in nominal control of the city as long as the ruler acknowledged Ahmad Shah's suzerainty over Punjab, Sindh, and Kashmir. Leaving his second son Timur Shah to safeguard his interests, Ahmad Shah left India to return to Afghanistan.
Alarmed by the expansion of China's Qing Dynasty up to the eastern border of Kazakhstan, Ahmad Shah attempted to rally neighboring Muslim khanates and the Kazakhs to unite and attack China, ostensibly to liberate its western Muslim subjects. Ahmad Shah halted trade with Qing China and dispatched troops to Kokand. However, with his campaigns in India exhausting the state treasury, and with his troops stretched thin throughout Central Asia, Ahmad Shah lacked sufficient resources to do anything except to send envoys to Beijing for unsuccessful talks.
The Mughal power in northern India had been declining since the reign of Aurangzeb, who died in 1707; In 1751-52, Ahamdiya treaty was signed between the Marathas and Mughals, when Balaji Bajirao was the Peshwa. Through this treaty, the Marathas controlled virtually the whole of India from their capital at Pune and the Mughal rule was restricted only to Delhi (the Mughals remained the nominal heads of Delhi). Marathas were now straining to expand their area of control towards the Northwest of India. Ahmad Shah sacked the Mughal capital and withdrew with the booty he coveted. To counter the Afghans, Peshwa Balaji Bajirao sent Raghunathrao. He defeated the Rohillas and Afghan garrisons in Punjab and succeeded in ousting Timur Shah and his court from India and brought Lahore, Multan, Kashmir and other subahs on the Indian side of Attock under Maratha rule. Thus, upon his return to Kandahar in 1757, Ahmad was forced to return to India and face the formidable attacks of the Maratha Confederacy.
Ahmad Shah declared a jihad (or Islamic holy war) against the Marathas, and warriors from various Afghan tribes joined his army, including the Baloch people under the command of Khan of Kalat Mir Nasir I of Kalat. Early skirmishes were followed by victory for the Afghans against the smaller Maratha garrisons in Northwest India and by 1759 Ahmad Shah and his army had reached Lahore and were poised to confront the Marathas. By 1760, the Maratha groups had coalesced into a big enough army under the command of Sadashivrao Bhau. Once again, Panipat was the scene of a confrontation between two warring contenders for control of northern India. The Third Battle of Panipat (14 January 1761), fought between largely Muslim and largely Hindu armies was waged along a twelve-kilometer front. Despite decisively defeating the Marathas, what might have been Ahmad Shah's peaceful control of his domains was disrupted by many challenges. As far as losses are concerned, Afghans too suffered heavily in the Third Battle of Panipat. This weakened his grasp over Punjab which fell to the rising Sikh misls. There were rebellions in the north in the region of Bukhara.
The victory at Panipat was the high point of Ahmad Shah's—and Afghan—power. However, even prior to his death, the empire began to unravel. In 1762, Ahmad Shah crossed the passes from Afghanistan for the sixth time to subdue the Sikhs. From this time and on, the domination and control of the Empire began to loosen. He assaulted Lahore and, after taking their holy city of Amritsar, massacred thousands of Sikh inhabitants, destroying their revered Golden Temple. Within two years, the Sikhs rebelled again and rebuilt their holy city of Amritsar. Ahmad Shah tried several more times to subjugate the Sikhs permanently, but failed. Ahmad Shah also faced other rebellions in the north, and eventually he and the Uzbek Emir of Bukhara agreed that the Amu Darya would mark the division of their lands. A decade after the third Battle of Panipat, Marathas under the leadership of Mahadji Scindia entered and recaptured Delhi in 1771, cutting off Rohillas from the Durranis forever. Ahmad Shah retired to his home in the mountains east of Kandahar, where he died on April 14, 1773. He had succeeded to a remarkable degree in balancing tribal alliances and hostilities, and in directing tribal energies away from rebellion. He earned recognition as Ahmad Shah Baba, or "Father" of Afghanistan.
Ahmad Shah's successors governed so ineptly during a period of profound unrest that within fifty years of his death, the Durrani empire per se was at an end, and Afghanistan was embroiled in civil war. Much of the territory conquered by Ahmad Shah fell to others in this half century. By 1818, the Sadozai rulers who succeeded Ahmad Shah controlled little more than Kabul and the surrounding territory within a 160-kilometer radius. They not only lost the outlying territories but also alienated other tribes and lineages among the Durrani Pashtuns.
Ahmad Shah was succeeded by his son, Timur Shah, who had been deputed to administer his father's conquests in Northern India, but had been driven out by the Marathas. Upon Ahmad Shah's death, the Durrani chieftains only reluctantly accepted Timur's accession. Most of his reign was spent fighting a civil war and resisting rebellion; Timur was even forced to move his capital from Kandahar to Kabul due to the insurgency. Timur Shah proved an ineffectual ruler, during whose reign the Durrani empire began to crumble. He is notable for having had 24 sons, several of whom became rulers of the Durrani territories. Timur died in 1793 and was then succeeded by his fifth son Zaman Shah
After the death of Timur Shah, three of his sons, the governors of Kandahar, Herat and Kabul, contended for the succession. Zaman Shah, governor of Kabul, held the field by virtue of being in control of the capital, and became shah at the age of twenty-three. Many of his half-brothers were imprisoned on their arrival in the capital for the purpose, ironically, of electing a new shah. The quarrels among Timur's descendants that through Afghanistan into turmoil also provided the pretext for the interventions of outside forces.
The efforts of the Sadozai heirs of Timur to impose a true monarchy on the truculent Pashtun tribes, and their efforts to rule absolutely and without the advice of the other major Pashtun tribal leaders, were ultimately unsuccessful. The Sikhs started rising to power in defence of the years of invasions of Punjab by the Afghanis. Zaman Shah was unsuccessful in subduing them. A young Sikh chief, Ranjit Singh, then succeeded in wresting power from Zaman's forces. Later when Zaman was blinded by his brother, it was Ranjit Singh who gave him asylum in Punjab.
Zaman's downfall was triggered by his attempts to consolidate power. Although it had been through the support of the Barakzai chief, Painda Khan Barakzai, that he had come to the throne, Zaman soon began to remove prominent Barakzai leaders from positions of power and replace them with men of his own lineage, the Sadozai. This upset the delicate balance of Durrani tribal politics that Ahmad Shah had established and may have prompted Painda Khan and other Durrani chiefs to plot against the shah. Painda Khan and the chiefs of the Nurzai and the Alizai Durrani clans were executed, as was the chief of the Qizilbash clan. Painda Khan's son fled to Iran and pledged the substantial support of his Barakzai followers to a rival claimant to the throne, Zaman's older brother, Mahmud Shah. The clans of the chiefs Zaman had executed joined forces with the rebels, and they took Kandahar without bloodshed.
Zeman Shah's overthrow in 1801 was not the end of civil strife in Afghanistan, but the beginning of even greater violence. Mahmud Shah's first reign lasted for only two years before he was replaced by Shuja Shah.
Yet another of Timur Shah's sons, Shuja Shah (or Shah Shuja), ruled for only six years. On June 7, 1809, Shuja Shah signed a treaty with the British, which included a clause stating that he would oppose the passage of foreign troops through his territories. This agreement, the first Afghan pact with a European power, stipulated joint action in case of Franco-Persian aggression against Afghan or British dominions. Only a few weeks after signing the agreement, Shuja was deposed by his predecessor, Mahmud. Much later, he was reinstated by the British, ruling during 1839–1842. Two of his sons also ruled for a brief period in 1842.
Mahmud's second reign lasted nine years. Mahmud alienated the Barakzai, especially Fateh Khan, the son of Painda Khan, who was eventually seized and blinded. Revenge would later be sought and obtained by Fateh Khan's youngest brother, Dost Mohammad Khan.
Ali Shah was another son of Timur Shah. He seized power for a brief period in 1818-19.
Ayub Shah was another son of Timur Shah, who deposed Sultan Ali Shah. He was himself later deposed, and presumably killed in 1823. The loss of Kashmir during his reign opened a new chapter in South Asian history.
[The Sadozai kingdom] continued to exist in Herat until the city finally fell to Dost Muhammad Khan in 1862.