Updated

Fighting between armed groups in Libya has killed hundreds of civilians and could lead to prosecution for war crimes, the U.N.'s top human rights official said Tuesday.

The U.N. high commissioner for human rights, Zeid Raad al-Hussein, said there have been hundreds of civilian deaths, widespread displacement of people and serious challenges to daily living for those trapped in areas of Libya where armed groups have fought in recent months.

"As a commander of an armed group, you are criminally liable under international law if you commit or order the commission of grave human rights abuses or fail to take reasonable and necessary measures to prevent or punish their commission," Zeid warned, noting that the International Criminal Court is investigating the situation in Libya.

A report Tuesday from his Geneva-based U.N. human rights office and the U.N. Support Mission in Libya found indiscriminate shelling of some civilian areas and at least 120,000 people driven from their homes in an escalating humanitarian crisis. The report is based on evidence between September and mid-December.

A spokeswoman for Zeid's office, Ravina Shamdasani, told reporters there is no accountability by the armed groups. "Some of these crimes may amount to war crimes," she said.

Libya's worst fighting since longtime dictator Muammar Qaddafi was overthrown in 2011 has fractured the country among two rival governments and several militant groups. The instability extends from western Libya's Nafusa Mountains to the eastern city of Benghazi and the southern Libyan town of Awbari. Some armed groups have arbitrarily detained migrants, particularly from sub-Saharan Africa.

Nearby nations are at risk of being destabilized by the chaos under Tripoli's factions and the arms flow from Libya into Africa's Sahel region, home to several militant groups.

Army Gen. David Rodriguez, who heads U.S. Africa Command, has said that the Islamic State group has set up training camps in eastern Libya with perhaps a couple of hundred fighters, but details are sketchy.