BENTIU, South Sudan — Two weeks after a massacre in Bentiu, the stench of bodies clung to the walls of the Kali-Ballee mosque. Bloodstains marked the ground; shirts, pants and sandals were still scattered about; and torn pages from the Quran were strewn all over the place.

“If you saw what happened here, you would cry for the rest of your life,” said Ahmad Bushara al-Dai, 60, a Sudanese merchant who witnessed the attack on the town by rebel forces last month.

“The first wave of soldiers took our money and cellphones; the second found nothing, so they started shooting,” he said.

On Thursday, United Nations investigators issued a report describing horrors committed “on a massive scale” by both sides in the civil war in South Sudan. Security forces went from house to house killing men belonging to certain ethnic groups, it said. Civilians have been killed seeking shelter in U.N. bases. Combatants from both sides have raped and assaulted women.

In the first major accounting of the violence in South Sudan, the U.N. documents crimes against humanity, including arbitrary killings and attacks on churches, hospitals and international-aid facilities.

“Civilians were not only caught up in the violence, they were directly targeted, often along ethnic lines,” the report states.

South Sudanese government officials could not be reached for comment.

The report is likely to boost calls for sanctions, which the United States began this week with a freezing of assets and travel bans.

But the report also illustrates the difficulties facing the U.N. mission in South Sudan. From the start, it has tried to support the fledgling nation. Now that the government is a party to a gruesome conflict, the Security Council is considering a change to its mandate so that it functions in a neutral capacity, with the principal goal of protecting civilians.

Civil war has engulfed South Sudan since December, when clashes erupted between soldiers loyal to President Salva Kiir and those loyal to his former vice president, Riek Machar. The conflict soon took on an ethnic dimension between South Sudan’s two largest groups, the Dinka and the Nuer. Kiir is a Dinka, while Machar is a Nuer.

Thousands of people have been killed; more than 1 million have been displaced; and the U.N. has warned that famine threatens much of the country.

The peacekeeping mission’s report, based on interviews with more than 900 victims and witnesses, said that “From the very outset of the violence, gross violations of human rights and serious violations of humanitarian law have occurred on a massive scale.”

But the recent scale of violence, especially in Bentiu, prompted one U.N. official to call it a “game changer.”

“I never thought the day would come when people would flee to Darfur,” said Toby Lanzer, the U.N. official in charge of coordinating the relief effort in South Sudan.

The cycle of revenge killings that started in Juba, the capital, and continued in Bentiu has brought greater international pressure on both sides of the conflict. Slow-moving negotiations have moved up a gear, with both sides scheduled to meet Friday in the Ethiopian capital, Addis Ababa.

The talks would follow recent visits to Juba by Secretary of State John Kerry and U.N. Secretary-General Ban Ki-moon. On Monday, delegations from both sides agreed to open humanitarian corridors so aid could reach civilians. They also agreed to consider a “month of tranquillity” to help the flow of aid and enable people to plant crops, care for livestock and move to safer areas.

“It’s very good that the two leaders have agreed to meet,” said Hilde Johnson, head of the U.N. mission in South Sudan. “But if we don’t see action on a number of fronts now, we are seeing a perfect storm coming.”