During the Xining era of the Northern Song, in the Hehuang Valley, now on the border between Gansu and Qinghai, the Song court has just recovered the six prefectures of Hehuang, and the fighting on the frontier has only just subsided. The people are impoverished: fields lie barren and irrigation has fallen into disrepair. Han Chinese, Qiang, and Tibetans live side by side, where the warmth of neighbors helping one another coexists with ethnic divisions, the exploitation of military farms, and the growing threat of powerful clans swallowing up land. The Song court has introduced the Green Sprouts Law and the Baojia system, but their implementation on the frontier has gone badly awry, leaving the people in misery. Yet opportunities remain to reclaim wasteland, expand the frontier, and secure a stable livelihood.