The villagers often travel for days through the bush to avoid indiscriminate killings by the marauding armed groups, which have set up checkpoints on the roads.

Hundreds have escaped to South Sudan’s other neighbors — notably Sudan and Ethiopia — where, the refugee agency said, an additional million have sought shelter. Two million more have been driven from their homes for other reasons, the agency said.

South Sudan became the world’s newest nation in 2011, when it declared its independence after five decades of guerrilla warfare and the loss of two million lives. Civil war erupted four years ago, after President Salva Kiir sacked his deputy, Riek Machar. The move set off bloody confrontations between their supporters and rival ethnic groups. The bloodshed has escalated and intensified in the last year, with a sharp rise in ethnically targeted killings and sexual violence.

The United Nations started deploying 4,000 troops to South Sudan this month to bolster a peacekeeping force of 13,000, but as violence has spread to new provinces, the agency has not been able to do much to protect civilians outside its bases or to prevent attacks on relief agency staff members trying to deliver humanitarian aid.