During the Yuanyou era of the Northern Song Dynasty (1086–1094), Bianjing (present-day Kaifeng) prospered as a commercial hub. The scholar-gentry and merchant classes mingled, while tensions between the old and new factions simmered beneath the surface.