Afghanistan, located in Central and South Asia, covers approximately 647,500 square kilometers. Its geographic location is highly strategic: to the north, it borders Tajikistan in Central Asia; to the east, China; to the south, Pakistan in South Asia; and to the west, Iran in West Asia. Afghanistan sits at the crossroads of Asia’s major regions, historically serving as a key hub for trade and military routes. For example, travelers from West and Central Asia heading to South Asia often had to cross the towering Hindu Kush mountains. Even during the Tang Dynasty, the famous monk Xuanzang passed through Afghanistan on his journey to India.

Because of its strategic location, many great powers in history attempted military campaigns in Afghanistan. The most well-known are the British, Soviet, and American invasions. From the 19th century onward, Britain waged three Anglo-Afghan wars; in the 20th century, the Soviet Union invaded; and in the 21st century, the United States launched its military campaign. Afghanistan’s mountainous terrain and the fierce combat abilities of its people made it extremely difficult to conquer. These challenges earned Afghanistan the title “Graveyard of Empires.”
Less well-known is that ancient China also waged military campaigns in Afghanistan. What was the outcome?

Tang Dynasty Governance in Afghanistan
The Tang Dynasty (618–907 CE) was one of China’s most powerful dynasties, with an unprecedented territorial span—from the Sea of Japan in the east to Vietnam in the south, reaching westward to the Aral Sea, and northward to Lake Baikal. Other powerful states in Asia at the time included the Persian Empire and the Arab Caliphate.
Persia (modern-day Iran) maintained friendly relations with Tang China. Afghanistan was originally under Persian influence, so initially, the Tang Dynasty had no intention of attacking the region. In 640 CE, the Tang established the Anxi Protectorate in the Western Regions, overseeing four garrisons: Suyab, Kucha, Khotan, and Shule—collectively called the Four Garrisons of Anxi. Notably, Suyab is the birthplace of the famous Tang poet Li Bai and is now in present-day Kyrgyzstan.

The Anxi Protectorate governed a vast area, covering parts of today’s Xinjiang and Central Asia, directly bordering Persia. At this time, the Arab Caliphate was rising. In 642 CE, Arab forces attacked Persia’s core region (modern Tehran). Persia, unable to resist, sent envoys three times to request Tang military assistance. Tang China did not intervene initially because Emperor Taizong was preparing to campaign against Goguryeo and did not want to fight on two fronts.
Had Tang China intervened, it might have preserved Persia as a buffer state against the Arabs. Instead, Persia fell in 648 CE. Surviving Persian forces fled eastward to Bactria, in present-day Afghanistan, treating it as a base against the Arab Caliphate.

Tang Military Campaigns in Afghanistan
With the remnants of Persia seeking refuge, the Arab expansion eastward threatened their survival. By 668 CE, during Emperor Gaozong’s reign, Tang China finally intervened. The Anxi Protectorate dispatched troops to defeat Arab forces, gaining control over much of Afghanistan.
Tang China established seven military governorships (Dudu Fu) in the region under the Anxi Protectorate. Notable among them were the Xiuxian Dudu Fu, roughly corresponding to modern Kabul, and the Dahan Dudu Fu, near present-day Mazar-i-Sharif in northern Afghanistan. Another Persian Dudu Fu was set up near the modern Afghanistan-Iran border to oversee remaining Persian resistance forces.
Conquest and Administration
After incorporating Bactria (modern Afghanistan) into its domain, Tang China consolidated control, and neighboring small states pledged submission. Among them was the northeastern Afghan principality of Xiaobolu. Initially a vassal of Tang China, it rebelled in 740 CE, frequently attacking the Bactrian governorates.

In 747 CE, Tang dispatched General Gao Xianzhi of the Anxi Army to quell the rebellion. The Anxi Army, renowned for its combat prowess, crossed mountains and established a temporary base in the Humid region of eastern Bactria before advancing on Xiaobolu. Tang forces first captured the key fortress of Lianyun, then laid siege to the principality’s capital. The city was naturally fortified, surrounded by cliffs and a river.
Tang employed a daring strategy: elite troops scaled the cliffs, infiltrated the city, and opened the gates for the main army. The rebellion was crushed, and the ruler captured. Tang China established another military governorship in Xiaobolu, maintaining stability in the region.
However, in 755 CE, the An Lushan Rebellion erupted, forcing Tang China to retract its strategic focus and gradually lose control over Afghanistan.