After centuries of stable rule, the Safavid dynasty of Persia began to decline, and chaos swallowed up the empire. Sultan Husayn was seen as weak, and the powerful Ghilzai Afghans of Kandahar rebelled against his rule. He dispatched a new governor to quell the uprising, but the Afghans killed him and began expanding their rebellion. Husayn marched out against the rebels with a force of three times their size, but his army was defeated, and the Afghans drove him back to the capital Isfahan, where they forced him to abdicate in 1722. Meanwhile, the Ottoman and Russian empires, seeing an opportunity to advance, seized great swaths of Persian land at their frontiers.
As Husayn's son Tahmasp II attempted to restore order, he called for aid from many of the local chieftains, including Nader of the Afshar. Nader had been born a shepherd's son. His father died when Nader was young, and then the boy and his mother were captured as slaves by raiders. Nader escaped slavery and later fell in with brigands. There, his tactical mind and ruthless spirit shown, and he rose to become their leader. He became admired by the Afshar chiefs, who welcomed him and gave him daughters to be his wives. When the Afghans came to his city Mashhad, he submitted but then escaped to build up a private army. His might grew until he was recognized and called upon by Tahmasp.
Nader discovered that Tahmasp's general Fath Ali Khan was a traitor and turned him over to the shah for execution. As a reward, Tahmasp granted Nader the title Servant of Tahmasp and gave him command of the army. Over the next three years, Nader created a powerful force that routinely defeated the Afghans in battle. In 1729, the Afghans fled, and Tahmasp returned to Isfahan. Nader plundered the city to reward his army and was granted governorship over the eastern part of Persia as well as Tahmasp's sister as another wife.
While war continued with the Afghans, Nader also campaigned against the Ottomans, chasing them out of the lands stolen during the uprising. His campaign was interrupted when the Afghans besieged his home at Mashhad, and he rushed east to rescue his family. Tahmasp took over the campaign and squandered Nader's victories, eventually signing a piteous treaty. Nader was infuriated and determined to overthrow the sultan. He managed to get Tahmasp drunk and displayed him to the court, showing that the sultan was unfit to rule. They forced him to abdicate, giving the throne to the baby Abbas III while Nader served as regent. He campaigned against the Ottomans for the next three years, finally winning back the lost provinces and creating an alliance with the Russians.
With the wars settled in 1736, Nader emulated his heroes Genghis Khan and Timur by calling a massive meeting of the leaders throughout the empire. Nader recommended himself as shah rather than the young Abbas, and the recommendation was accepted unanimously. He then carried on the war against the remaining Afghan strongholds, finally defeating them utterly in 1738. Still hungry for conquest, he pressed on into the Mughul Empire of India, claiming they had harbored Afghan enemies. At the Battle of Karnal in 1739, his army of some 55,000 destroyed a force twice its size. Nader captured the emperor Mohammad Shah and carried him to his own capital, Delhi.
There, as the triumphant army entered, Nader found himself stabbed by an assassin posing as a prince with a gift. The city turned to pandemonium. Indians excited by the news of Nader's death attacked Persian soldiers. The soldiers counterattacked and looted what they could, but eventually the Persian army fled India in disarray.
Meanwhile, Nader's son Reza Qoli Mirza had been ruling Persia while his father was away campaigning. Upon news of his father's death, Reza had the remaining Safavids, including former sultans Tahmasp and Abbas, executed. Tahmasp's sister, Nader's wife, committed suicide, and no one stood against Reza as he took the throne. While his father had been a military genius, Reza preferred the imperial life to campaigning. He enjoyed luxuries, and the British East India Company proved able to supply them. Reza traded infatuations with Europe, who took him to be the son of the "Second Alexander", as legends grew about Nader. Envoys from Europe showered Reza with gifts, and the new sultan gave glamorous contracts for trading posts. Many Persians distrusted the foreigners, and a threat arose to Reza's power when Kurds rebelled in 1747. Rather than leading the army himself, Reza brought in European mercenaries. After the rebellion was put down, the mercenaries stayed. Reza began massive modernization projects, primarily canals, which brought the attention of French and British bankers to the nation.
Upon Reza's death in 1766, the British orchestrated a take-over of Persia, installing a puppet ruler much as they had done with principalities in India as the Mughul Empire collapsed. Gradually over the next century, the lands would be split up between Britain in the south and Russia, who seized much of the north. When the world entered its post-war phase of relinquishing colonies, former British Iran and the Soviet satellites of Azerbaijan and Khurasan became prime grounds for Cold War activity, especially along the western Iranian oilfields.