Heavy fighting has erupted in the eastern Libyan city of Benghazi, apparently between the armed group Ansar al-Sharia and irregular forces loyal to Khalifa Haftar, a former army general.

At least 19 people have been killed and 82 injured in the fighting, hospital sources told Al Jazeera.

Witnesses said on Monday that gunfire, which began the day before, could be heard across the city, particularly coming from a special forces army base in a western suburb of Benghazi.

Haftar is campaigning to rid Libya of fighters that he says the federal government has failed to control.

Suleiman El Dressi, a Benghazi resident in the area of the clashes, told Al Jazeera that two people had been killed as a result of explosions there.

"Residents are at home and they are very scared, waiting for the clashes to be over," he said.

"Central government cannot control anything happening here, in the east [of the country], they are hopeless and useless."

Local residents say the fighting is the worst they have seen since March 2011, when forces loyal to the late leader Muammar Gaddafi tried to enter the city.

On Sunday, a Libyan fighter jet under Haftar's command attacked an Ansar al-Sharia base in Benghazi but did not hit the target, witnesses and a senior Libyan official told news agencies.

The AP news agency quoted a member of Ansar al-Sharia as saying no one was hurt in the bombing.

The aircraft attacked a building which houses a base belonging to Ansar al-Sharia, Mohamed al-Hejazi, a spokesman for Haftar, told Reuters.

"Our forces attacked the crown prince's former building, where Ansar al-Sharia is based," he said.

However, a Reuters reporter at the scene said there was no damage at the building.

Ansar al-Sharia gained support following the death of Gaddafi in 2011. The group is thought to be behind the 2012 attack on the US consulate in Benghazi that killed four people including the US ambassador.

Libya is in turmoil three years after the NATO-backed war that removed Gaddafi, with various factions locked in conflict.