A Libyan medical official says eight people from one family, including seven children, were killed when mortar shells hit near their house in the restive eastern city of Benghazi.

Ashraf al-Saiti, a senior medical official at al-Jala hospital, says the shelling took place late on Thursday when the family's home in al-Salam district came under intense shelling from the nearby al-Sabri neighborhood, a stronghold of Islamic extremists.

He says the children were between five and 10 years old.

Fighting has been raging in Benghazi for nearly a year, mostly between army units and fighters loyal to the internationally-recognized government on one side, and Islamic extremists, including militants from an Islamic State affiliate, on the other.

The fighting has killed hundreds and displaced thousands.