More than 3 million books were destroyed when rockets hit the ministry of education buildings during fighting between rival government forces over the Libyan capital Tripoli, officials and the United Nations said on Monday.
Almost two weeks ago, eastern Libyan forces, allied to a parallel government, started an advance on Tripoli, held by the internationally recognised administration, deepening the chaos in the country since the overthrow of Muammar Gaddafi in 2011.
The front has hardly moved for days, as armed groups supporting the UN-backed government in the capital in western Libya have fought back.
But air strikes and shelling have hit civilian infrastructure and residential homes, especially in the south of the capital where the eastern forces have been trying to push through government defences.
The UN humanitarian agency OCHA said targeting civilian facilities was a violation of international humanitarian law.
The UN Libya mission UNSMIL also warned in a statement that "the bombing of schools, hospitals, ambulances and civilian areas is strictly prohibited", adding that it was documenting such cases for the UN Security Council.
A school was hit on Saturday in an air strike blamed on the eastern forces of the self-styled Libyan National Army (LNA), Tripoli officials said.
Two missiles also hit education ministry warehouses late on Sunday, destroying 3.1 million school books, an official in the Tripoli government told Reuters.
The OCHA said in a tweet 5 million books and national exam results had been destroyed.
In another incident, Reuters reporters on Monday filmed a residential block in southern Tripoli that was hit by at least one rocket. Several families were inside during the strike but escaped unhurt bar some minor wounds.
Children's shoes, bread and the remains of the rockets were on the floor of the damaged house. One children's room survived undamaged.
Both sides have blamed each other for shelling residential areas.
More than 18,000 people have been displaced by the fighting, 2,500 alone in the past 24 hours the UN migration agency said.
Nearly 150 people, mostly fighters, have been killed, the World Health Organization said. More than 600 people have been wounded.
The surprise offensive by eastern commander Khalifa Haftar led to the postponement of a UN national conference, planned long before his advance, that had been intended to bring the two sides together to plan an election and end the turmoil.
No new date has been set yet as there is no sign of an end to the fighting.
Haftar has long said his declared mission is to restore order to the north African country.