At least 18 people have been killed in continuing violence around the eastern city of Benghazi.
The fighting came during an offensive by General Khalifa Hifter against Islamist groups. The clashes near Benghazi University started late on Sunday and continued overnight, forcing school exams to be cancelled. Gunfire and grenades damaged homes, according to witnesses.
Helicopters attacked camps and strongholds of Islamist militias Monday in eastern Libya, and militiamen responded by firing rocket-propelled grenades and anti-aircraft guns at the attacking troops.
A former Gaddafi-era army chief, Hifter has rallied support from the country's weakened military, its anti-Islamist politicians, tribes and diplomats, vowing to crush the Islamist militias he blames for Libya's instability.
The clashes started late Sunday and continued overnight, forcing the Education Ministry to cancel high school exams.
Witnesses said the clashes were near Benghazi University and that gunfire and grenades damaged homes, witnesses said.
In Benghazi's southern districts, citizens set up checkpoints to prevent rival forces from taking shelter as shops closed, witnesses said.
Residents have also been unable to leave as the airport has been closed since Hifter's offensive began three weeks ago. Traveling by road has become risky because of the violence.
Mohammed al-Hegazi, a spokesman for Hifter, called on residents to stay away from the fighting. He accused Islamist militias of firing at houses and civilians.
"This is not a football match. This is a war. People must stay away so they won't be used as human shields," he said.