One more cup of wine for our remaining happiness. There will be chilling parting dreams tonight.
- Ninth-century poet on a leave-taking at Jiayuguan

To some Chinese, the very name JIAYUGUAN (嘉峪关, jiāyù guān) is synonymous with sorrow and ghastly remoteness. The last fortress of the Great Wall was built here by the Ming in 1372, over 5000km from the wall’s easternmost point at Shanhaiguan, from which time the town made its living by supplying the needs of the fortress garrison. This was literally the final defence of the empire, the spot where China ended and beyond which lay a terrifying wilderness. The fort, just outside the town and perfectly restored, is one of the great sights of northwestern China, and there are also a number of other forts and beacons scattered around in the desert. Apart from its main attraction, Jiayuguan is a bleak, lonely place. Despite this its inhabitants, on the whole, manage to be a cheerful bunch.

The fort (城楼, chénglóu) at the Jiayuguan Pass is the most important sight in the Hexi Corridor. Its location, between the permanently snowcapped Qilian Mountains to the north and the black Mazong (Horse’s Mane) Mountains to the south, could not be more dramatic – or more strategically valuable. Everything that travelled between the deserts of Central Asia and the fertile lands of China – goods, traders, armies – had to file through this pass. The desolation of the landscape only adds to the melancholy: being forced to leave China altogether was a citizen’s worst nightmare, and it was here that disgraced officials and condemned or fleeing criminals had to make their final, bitter farewells.

Some kind of fort may have occupied this site as early as the Han dynasty, but the surviving building is a Ming construction, completed in 1372. Sometimes referred to as the “Impregnable Defile under Heaven”, it comprises an outer and an inner wall, the former more than 700m in circumference and about 10m high. At the east and the west of the inner wall stand symbolic gates, the Guanghua Men (Gate of Enlightenment) and the Rouyuan Men (Gate of Conciliation), respectively. Inside each are sloping walkways that lead to the top of the wall, enabling horses to climb up and patrol the turrets. In between the Gate of Enlightenment and the outer wall stand a pavilion, a temple and a somewhat haunting open-air theatre once used to entertain troops.