After their defeat at the Battle of Pyongyang, the Beiyang Army made its next stand at the crossing of the Yalu River, the border between Korea and China. On the Chinese side, Qing general Song Qing established his headquarters at the walled town of Jiuliancheng (九連城), and fortified the banks of the Yalu River south to the local district capital of Dandong and north to the village of Hushan (虎山) for about 16 kilometers in either direction with over a hundred redoubts and trenches manned by around 23,000 troops.[1]