BENGHAZI, Libya (Reuters) - Libyan forces have recaptured key areas in the city of Benghazi, building on earlier advances during weeks of clashes with Islamist militants and other opponents.

Troops allied with the government based in eastern Libya took control of a cement factory and cemetery in El Hawari district, where fighters loyal to Islamic State had been holding out, said Milad al-Zawie, a spokesman for the government forces.

The troops also took a camp behind Garyounis university, which they captured on Sunday, Zawie said. Five soldiers were killed and nine wounded in the Benghazi fighting, he said.

The university has been one of the most bitterly contested sites in the city since the eastern military commander, Khalifa Haftar, launched his Operation Dignity campaign to rid the city of Islamists and other opposition in May 2014.

Benghazi itself has seen some of the heaviest fighting in the conflict that has engulfed Libya after the 2011 overthrow of Muammar Gaddafi.

The country has been split since then between two governments, one in Tripoli and one in the east. Various armed groups are allied with both governments, and Islamist militants have inserted themselves into the conflict.

The army began a fresh push in Benghazi in February, recapturing the neighborhoods of Laithi and Boatni and allowing some residents to return to their homes. But until now the army had not built on those advances.

A U.N.-backed unity government arrived in Tripoli last month, and is trying to establish itself by winning over opponents in both the east and west of the country.