In the tenth month of 763, the gates of the capital were opened from the inside.
The garrison commander had surrendered. The civil officials had run. There was no line of soldiers standing in the gateways. Tibetan cavalry came across the Wei River bridge and into the streets, and nothing in the city was arranged to stop them.
The last time a foreign army had entered this city, more than six centuries had passed since it was built.
And the emperor was not in it.
Li Yu, known to history as Emperor Daizong of the Tang, had already gone east. He went as far as Shanzhou, and the official record spends exactly four characters on the manner of his leaving. He left in a hurry.
The hurry is worth following, because it explains everything that came after. He went out of the park gate, crossed the Chan River, and by the time he reached Huazhou most of his officials had scattered. The prefect of Huazhou had run too. Nobody had prepared food. The emperor and what was left of his court sat in a post station from morning until dark, and the only reason he ate that day was that a eunuch general named Yu Chaoen brought troops down from Shanzhou to collect him.
An emperor, inside his own country, fed by a private army because the administration had evaporated.
The Western Army Was Gone
To understand why the road west was empty, you have to go back seven years.
In 755 a frontier general named An Lushan turned his army around and marched on the capital. The court pulled its best troops east to stop him: the garrisons of Hexi, Longyou and Shuofang, the men who had spent their lives on the edge of the Gobi. They held the passes. They retook the two capitals. They were at the disaster outside Ye when the river broke and carried away a camp.
Those soldiers had been trained in wind and salt. Their horses knew the grass of Taiyuan and the snow of the Qilian range. After seven years of civil war, the men were gone from the frontier, the horses were gone, and so were the men who kept the watchtowers lit.
The Tibetans walked in through the gap.
They did not come alone. The Tibetan field army was joined by Tuyuhun, Tangut, Di and Qiang contingents, and the histories put the combined force at more than two hundred thousand. The prefect of Jingzhou, a man named Gao Hui, changed sides early and then served as their guide, telling them which passes could be walked around and which granaries still had grain in them. That is why the advance was so fast. From the frontier to the walls of the capital, they fought almost no real battle.
From 758 onward, prefectures in the west began to disappear from Tang tax registers, one every few months. By 763 the whole corridor north of Binzhou and west of Fengxiang belonged to somebody else. Tibetan scouting parties were seen less than a hundred kilometres from the capital, and in the capital people were still arguing about sutras.
Nobody wanted to tell the emperor.
The man who controlled that door was named Cheng Yuanzhen. He was a palace eunuch holding the rank of grand general, and every military despatch from the provinces passed through his hands first. The reports from the west arrived. He sat on them. His reasoning, as far as anyone can reconstruct it, was that the emperor was in the middle of a Buddhist ceremony and should not be disturbed.
The emperor learned that there was a war on when the enemy had already passed Binzhou.
Twenty Horsemen
Daizong issued the orders. The provinces were to send troops.
Nobody came.
The provincial commanders hated Cheng Yuanzhen enough to let the emperor fall. This is not hindsight. A scholar named Liu Kang wrote it into a memorial afterwards in plain words: the enemy crossed the passes, and not one civil official spoke, not one general marched, and the people of the three districts around the capital would not lift a hand to defend the court. Then he added something worse. This was not the fault of one man, he wrote. The hearts of the whole country had come loose.
It was not an insult. It was a description.
And Guo Ziyi was at home.
He had been the most successful commander of the civil war. In 762 Cheng Yuanzhen had poisoned the emperor’s ear against him, and his command was taken away. He was kept in the capital with his titles intact and no soldiers at all. So for a while the old general spent his days in a quiet courtyard, looking at the trees.
Now a warrant arrived making him deputy commander of the capital region. A prince was named commander in name only. The actual troops were his.
How many men did he have when the warrant reached him?
Twenty horsemen.
Twenty riders went out of the city and east toward Shangzhou, collecting as they went: stragglers from the pass, boatmen pressed into service, men who had thrown away their spears and were walking home. By the time he reached Shangzhou he had four thousand.
Four thousand, against two hundred thousand.
He stopped at Lantian and would not go further. The first thing he did there was not drill the men. It was send parties out to find grain, because feeding four thousand was harder than fighting with them.
A Puppet on the Throne
Once inside the capital, the Tibetans did something that told the whole story of their intentions.
They crowned an emperor.
The man they chose was Li Chenghong, a grandson of a Tang prince who had been dead for years, and by descent a great grandson of Emperor Xuanzong. He had no following, no troops, no household of his own, and almost no presence in the imperial clan. That was exactly why he was useful.
They gave him a court. They gave him a new reign title. They found him clerks, among them a former imperial academician named Yu Kefeng, and set him to work issuing documents in the correct Tang format with the correct Tang seals. Some of the city’s officials reported for duty. The alternative was death.
For those days, the Tang had two emperors.
One at Shanzhou with no army. One in the capital with no power.
The Tibetan troops went through the warehouses and the markets and took what could be carried. In a city laid out in one hundred and eight walled wards, the ward gates stayed shut by day and people climbed the walls at night. Officials hid in the hills. Families fled south toward the Yangtze. In the busiest quarters, the doors stood open all night with nothing behind them.
They wanted goods and people, not the administration of a province. That distinction turned out to be the one thing the dynasty had left.
Why only fifteen days? Because the capital was too big for them. Coming down off the plateau, over the Longshan range, out onto the Wei plain, they had already stretched their supply line to breaking. There was grain in the city, but grain has to be carried, and the road home ran back through Fengxiang and Binzhou. Two hundred thousand men are an army in open country. Between the walled wards of a capital they are a logistics problem.
The harder problem was the chair. Crowning Li Chenghong and issuing a few decrees did not make the Guanzhong plain acknowledge him. Tuyuhun cavalry could take goods. Tangut herders could drive off cattle. Collecting taxes, calling up labour, making two million people accept a new reign title, that was a different trade entirely.
So when the fires appeared on the ridges, they had a reason to leave.
They were not driven out. They were counted out.

Rumours in the Dark
Guo Ziyi reached Lantian with his few thousand and did not attack.
He sent two hundred cavalry north of the town under an officer called Zhangsun Quanxu. By day they beat drums and kept their banners high and rode back and forth where they could be seen. By night they lit fires on the ridges, dozens of separate fires from two hundred men, until from a distance the hills looked full of camps. Then he pushed a second column forward under Zhang Zhijie to make the noise seem even larger.
He was not trying to win a battle. He was trying to make the other side believe that a battle was already on its way.
He also sent several hundred men into the city in plain clothes under a guard officer named Wang Fu, to find the young toughs who ran the ward markets. Those men could not hold a wall, but they knew every alley, and they knew which footing of which wall a man could squeeze through.
After dark, drums began on the ward walls.
Someone on a rooftop shouted that the general Guo was coming with the main army.
The shout went on all night. Wherever it started, the Tibetan pickets pulled back. They had no idea how many men were in the hills, they had seen the fires, and now the whole city was shouting at them.
The next morning they broke camp and went west.
They left in such a hurry that they did not get all the prisoners out.
On the way back they stopped to invest Fengxiang, wanting to pull the nail out of their rear. The garrison commander there, Ma Lin, came out and fought them in the open, and they did not get the town. They kept going west.
Fifteen Days
From entry to withdrawal, fifteen days.
In the twelfth month the emperor came back from Shanzhou. Guo Ziyi knelt by the roadside and asked to be punished. Daizong raised him and said the only honest thing available: I should have used you sooner, and then this would not have happened.
He gave him an iron writ of immunity and had his portrait painted into the Hall of Merits.
The memorial from Liu Kang was still on the desk, asking for Cheng Yuanzhen’s head. The emperor refused to kill him and merely stripped his titles and sent him home. He came back to the capital anyway, was reported, was exiled, and was murdered on the road by a man with an old grudge.
The capital was recovered.
The west was not.
Here is where a European reader has an advantage, because the same shape of event is in their own record. In 410 the Visigoths walked into Rome and spent three days inside it, and the emperor was not there, because the court had moved to Ravenna years before. People at the time wrote as though the world had ended. The Western Roman Empire lasted another sixty six years. What killed it was not the day the gates opened. It was the provinces that had already stopped belonging to it.
The Tang had the same problem, and the same arithmetic.
After 763 the Tibetans came back almost every year. In 765 a Tang general in revolt brought them and the Uyghurs south with three hundred thousand men, and Daizong fled again, and Guo Ziyi rode alone into the Uyghur camp and talked the alliance apart.
The Hexi corridor was gone. Liangzhou, Ganzhou, Suzhou, Guazhou, one after another. Tang envoys going to the Western Regions had to loop north through Uyghur grass and take a year to arrive.
That state of things lasted nearly sixty years, until 821, when Tang and Tibetan envoys met in both capitals and signed a treaty of peace and fixed frontiers. A stone pillar was raised in Lhasa with the text on it, and that pillar is still standing. The treaty was possible because neither side could fight any more, not because the Tang had an army again.
What actually recovered the corridor was a local man. In 848 a commander named Zhang Yichao raised troops at Dunhuang and sent the registers of eleven prefectures back to the capital. By then six emperors had come and gone in the city he was writing to.
What those fifteen days left behind inside the Tang was more durable than the loss of a dozen prefectures.
Liu Kang did not get his execution, but the road he had complained about stayed open. Yu Chaoen took Cheng Yuanzhen’s place, and the Shence Army turned from a frontier corps into the standing garrison of the capital, with its rolls and its pay in eunuch hands. For the next one hundred and forty years, emperors were made and unmade by that army as often as by anything else.
In 763 the emperor needed a private army to reach Shanzhou. He never managed without one again.
Guo Ziyi lived a long time. He was given troops again, and had them taken away again. Under the next emperor he was honoured as an elder statesman with almost no command at all, and died in 781 at the age of eighty five, with his sons and grandsons filling posts across the administration. Very few men who won that kind of victory ended up so quietly.
A man who could turn twenty riders into a victory was finally filed away by the system. That was not his failure.
From that autumn to the fall of the dynasty in 907, one hundred and forty four years passed. Fifteen days did not end the Tang. It shortened it.