NAIROBI (Reuters) - Two top officials overseeing South Sudan’s military courts have resigned, saying high-level interference made it impossible to discipline soldiers accused of rape and murder amid the nation’s civil war, according to letters seen by Reuters on Saturday.

South Sudan's President Salva Kiir (C) is escorted as he arrives for the 28th Ordinary Session of the Assembly of the Heads of State and the Government of the African Union in Ethiopia's capital Addis Ababa, January 30, 2017. REUTERS/Tiksa Negeri

The resignations of Brigadier General Henry Oyay Nyago and Colonel Khalid Ono Loki follow the resignations of a highly respected general and the minister of labor earlier this week.

Oil-rich South Sudan has been mired in civil war since 2013, when President Salva Kiir, an ethnic Dinka, fired his deputy Riek Machar, an ethnic Nuer.

Since then, fighting has increasingly fractured the world’s youngest country along ethnic lines, leading the U.N. to warn that the violence was setting the stage for genocide.

Both Nyago and Loki said soldiers were committing crimes without fear of punishment, particularly officers who were Dinka, the same tribe as the president and chief of army staff.

“Your regime committed sundry war crimes; crimes against humanity; genocidal acts and ethnic cleansing,” wrote Nyago.

“Rape cases committed and being committed by your army and organized forces have become a daily game ... you have recruited children compulsorily and ordered killing of war prisoners.”

Both Nyago and Loki said the president was protecting soldiers from his own tribe.

“In your relentless endeavors to protect your own ethnicity, and founded on no single law, you always freeze and/or abolish court issuance and rulings even of murder, rape and theft cases,” Loki wrote.

“You have ordered arrests of civilians in military jails exterior (outside) of proper legal channels.”

The resignations buttress allegations by international rights groups that the government permits soldiers to gang-rape and murder civilians with impunity. The U.N. has documented hundreds of accusations of rape involving soldiers in the capital alone.

Paul Yugusuk, an Anglican bishop in the region, told Reuters that government soldiers had gang-raped several women in the village of Kubi, 15 kilometers (nine miles) southwest of the capital, last Sunday. The youngest victim was 13, he said. Yugusuk said the military had sent a team to investigate.

A military spokesman could not immediately be reached for comment.

Rebels have also been accused of human rights abuses, although fewer cases have been documented.

Military spokesman Brigadier General Lul Ruai Koang said Loki had resigned last year but that it had not been publicized.

He did not comment on reports of human rights abuses by the military and was unavailable for comment on Nyago’s resignation.

The government has previously said soldiers who commit abuses are prosecuted. Officials have not provided any figures or details on such cases.

The rash of resignations will isolate Kiir’s government further within the international community and strengthen calls for a regional protection force to patrol the capital and for the military to withdraw.

There are 15,000 U.N. peacekeepers in South Sudan, but they have been criticized for not intervening when human rights abuses are being committed.

The conflict has forced more than 3 million of the nation’s 11 million citizens to leave their homes, creating pockets of severe malnutrition. Last year inflation reached over 800 percent.