Cao Cao defeated an alliance of anti-Han rebels in modern Tongguan County, securing his control over Guanzhong.