The United Nations said Wednesday that pro-government forces and Islamist militias fighting for control of Libya's key eastern city of Benghazi had agreed to a humanitarian truce.

U.N. spokesman Stephane Dujarric said the U.N.-brokered truce started at 7 a.m. local time and would last 12 hours. He said the Libyan Red Crescent planned to evacuate civilians, remove bodies, tend to the wounded and restock food supplies.

The United States welcomed the cease-fire and the reports that the parties were adhering to it. A State Department spokesman Jeff Rathke urged all Libyans to support the truce to allow the Red Crescent to evacuate civilians from affected areas and to give civilians the chance to address their humanitarian needs.

Hundreds of people have been killed since the launch of a government-backed offensive against Islamist militias who nearly took full control of Benghazi earlier this year.

A Libyan army spokesman recently said 95 percent of Benghazi was back under the control of Libyan army units, but admitted that Islamic fighters still controlled some areas.

Much of Libya remains under the sway of various Islamist, tribal and regional groups. One eastern town, Darna, is led by militants who recently declared allegiance to the self-styled caliph of the Islamic State.

The State Department spokesman said Wednesday U.S. officials are closely monitoring the situation in Darna. He said they are watching for signs such statements of allegiance are more than "purely rhetorical support."

Libya's government and parliament took refuge in far eastern Libya when Islamist-backed militias seized the capital, Tripoli, in August.

The army has been fighting an array of Islamist, tribal and regional groups, with Benghazi repeatedly swept up in the turmoil.