At least four people have been killed in clashes in Benghazi between forces loyal to the former General Khalifa Haftar and fighters he has declared as "terrorists".

At least 14 people were also wounded in Sunday's fighting, Reuters news agency reported, as fighting prompted dozens of families to flee the port in the latest bout of violence to hit the country.

"There are now heavy clashes in Sidi Faraj and al-Hawari [in western Benghazi]. Our forces are attacking with tanks and rocket launchers," Mohamed el-Hejazi, Haftar's spokesman, said.

The sound of heavy weapons fire could be heard on the streets of Sidi Faraj, and families were fleeing affected areas, witnesses said.

Electricity was cut to a large part of the city, with state news agency LANA saying a rocket fire had hit a power station, and that technicians were trying to restore power.

Haftar has declared war against groups including Ansar al-Sharia and February 17, and several army units have joined him, though the Tripoli government says he has no authority to act.

Hejazi said Haftar had warned his enemies against shipping in arms into Benghazi via the commercial port of Derna.

Derna is a hotspot for Ansar al-Sharia and other armed groups. The US designates Ansar as a terrorist organisation.

Haftar was once close to Muammar Gaddafi but turned on him in the 2011 uprising against his rule.

In February, he stirred rumours of a coup by appearing in military uniform to call for a presidential committee to be formed to govern until an election.