PIBOR, South Sudan — The trail of corpses begins about 300 yards from the corrugated metal gate of the United Nations compound and stretches for miles into the bush.

There is an old man on his back, a young woman with her legs splayed and skirt bunched up around her hips, and a whole family — man, woman, two children — all facedown in the swamp grass, executed together. How many hundreds are scattered across the savannah, nobody really knows.

South Sudan, born six months ago in great jubilation, is plunging into a vortex of violence. Bitter ethnic tensions that had largely been shelved for the sake of achieving independence have ruptured into a cycle of massacre and revenge that neither the American-backed government nor the United Nations has been able to stop.

The United States and other Western countries have invested billions of dollars in South Sudan, hoping it will overcome its deeply etched history of poverty, violence and ethnic fault lines to emerge as a stable, Western-friendly nation in a volatile region. Instead, heavily armed militias the size of small armies are now marching on villages and towns with impunity, sometimes with blatantly genocidal intent.