THE world's newest country, South Sudan, is facing its first big test, barely two months after its inauguration. On August 18th a deadly cycle of cattle raids and revenge attacks reached a climax in the small town of Pieri, in Jonglei state, one of South Sudan's poorest and least developed. Armed men from the Murle ethnic group swept in at dawn, burning huts, slaughtering children in front of their mothers and causing thousands of people to flee into the bush. More than 600 ethnic Lou Nuer are reported killed, 200 children abducted, and 25,000 cows stolen.

The Murle were taking revenge. In June, some 400 were killed in Pibor county by the Lou Nuer. The clashes go back decades but intensified in 2009, a year when more people died in Jonglei than in Darfur, the strife-ridden western region of Sudan. In Jonglei the Dinka tribe and the Jikany Nuer, as well as the Murle and Lou Nuer, have been fighting over cattle, a vital source of wealth in swathes of South Sudan because young men need them for marriage dowries. Cattle raids take place in other South Sudanese states too, but nowhere is the habit as deadly as in Jonglei.

New factors have made things worse. Young men used to try to rustle cattle with spears. Now, after decades of civil war, automatic weapons are rife. The new government in Juba, South Sudan's current capital, says that during the war years the government of the rump country in Khartoum dished out arms to client groups such as the Murle to keep the south weak.

Now each cattle raid results in multiple deaths, creating an ever greater thirst for revenge. “The problem is poverty,” says Jonglei's governor, Kuol Manyang. His domain has hardly any proper roads, so the security forces often cannot reach trouble-spots to head off problems. The police are ill-equipped and the army is still making the tricky switch from a guerrilla movement to a professional national force. Some politicians suggest that troops with no ethnic links to Jonglei should be sent in.

A UN peacekeeping mission says it will help the fledgling army to reimpose order, but it has committed only 150 troops for a limited period. They are now stationed in the area considered most likely to be hit by a revenge attack. The southern government says it has a plan to disarm civilians, to reconcile old enemies by using traditional and religious leaders as mediators, and to speed up development, starting by building a road network.

Disarmament will not be easy. “Uneven and forcible disarmament campaigns of years past…deepened antagonism between ethnic communities and undermined confidence in government,” says Zach Vertin of the International Crisis Group, a Brussels-based organisation. “Until neighbouring ethnic groups are disarmed evenly and adequate security alternatives extended in the wake of disarmament, communities will be reluctant to comply and the cycles of violence may continue.” Cattle raids will not bring down the new government. But as long as they persist, development will be stymied, confidence in the government will crumble and investors will stay away.

Even as blood flows within South Sudan, the new country's relations with Khartoum have worsened. Fighting has broken out in Blue Nile state, just north of the new border, between forces loyal to the government in Khartoum and an opposition group called the Sudan People's Liberation Movement-North that is made up of rebels who sided with the forces that won independence for South Sudan but were orphaned on the wrong side of the border when the new country was born.

Both sides accuse the other of starting it. Tens of thousands have deserted the state capital, Damazin. The northern air force has bombed the rebels' stronghold at Kurmuk, nearer the border with South Sudan. Since June SPLM-North has also been fighting Sudanese government forces in South Kordofan, which lies across a central band just north of the new line. After the war spread to the Blue Nile last week, the Sudanese government in Khartoum shut SPLM-North's offices throughout Sudan and arrested many of its people. It has accused South Sudan of helping old comrades with arms and cash, and says it has reported the new government in Juba to the UN Security Council. Not exactly friendly new neighbours.