Civilians fleeing violence seek refuge at the UNMISS compound in Bor, capital of Jonglei state, in South Sudan. (Hailemichael Gebrekrstos/AP)

Less than three years after its creation, the world’s newest country is beginning to fracture along ethnic lines in violence that has killed up to 500 people. What could come next, some warn, is ethnic cleansing.

South Sudan’s numerous ethnic groups have battled each other for decades, but for years they were united in hatred of the government in Khartoum, Sudan, which ruled their homeland. When the south gained independence in 2011, the groups’ common enemy receded, exposing fault lines — this week, even within the presidential guard.

On Thursday, armed youths breached a U.N. compound in a village in Jonglei state, causing an unknown number of casualties, Farhan Haq, a U.N. spokesman in New York, said. Meanwhile, U.S. and British citizens, aid workers and U.N. personnel continued to leave on emergency evacuation flights.

South Sudan’s government first declared that its security forces “are in absolute control of the situation” but admitted later Thursday that the central government had lost control of Bor, the capital of Jonglei, the country’s largest and most populous state.

“The situation in South Sudan can be best described as tense and fragile. If it is not contained, it could lead to ethnic cleansing,” said Choul Laam, a top official with the ruling Sudan People’s Liberation Movement, who spoke in Nairobi.

Violence broke out late Sunday when the presidential guard splintered along ethnic lines. Guards from the president’s majority Dinka tribe tried to disarm guards from the Nuer ethnic group, Laam said. Violence in the capital, Juba, spiraled from there and extended out into the country.

“The awful accounts of killings in Juba may only be the tip of the iceberg,” Daniel Bekele of Human Rights Watch said.

President Salva Kiir earlier said that an attempted coup had triggered the violence, and he placed the blame on ousted vice president Riek Machar, an ethnic Nuer.

Machar disputed Kiir’s allegations that he had attempted a coup.

But he said that he wants Kiir out of power. “He can’t unite the people, and he kills them like flies,” Machar told Radio France Internationale.

Machar, an influential politician and a hero of the brutal war of independence against Sudan, is Kiir’s rival for leadership of the Sudan People’s Liberation Movement. Tensions had been mounting since Kiir fired Machar as his deputy in July. Machar later said he would contest the presidency in 2015.

— Associated Press