TRIPOLI (Reuters) - Clashes between rival Libyan factions east of Tripoli extended into a second day on Monday, keeping the coastal road shut and preventing residents from returning to their homes, a local town council spokesman said.

The fighting began on Sunday when armed groups opposed to the U.N.-backed government in Tripoli tried to approach the capital and met resistance from rival groups that have aligned themselves with the government.

It is the latest in a series of attacks by armed opponents of the Government of National Accord (GNA), which have continued despite the GNA’s attempts to win the cooperation of militias operating in the city and to calm bouts of violence inside or close to the capital.

“At the moment we can hear heavy gunfire,” said Al-Shareef Jaballah, a spokesman for the municipality of Garabulli, about 50 km (30 miles) from Tripoli, speaking to Reuters by telephone shortly after midday.

“The clashes have resulted in severe damage to houses and shops because of indiscriminate shelling, and forced a large number of residents ... to flee,” he said.

“The coastal road is still closed. The residents who have fled their homes are trapped because of the closure of the road.”

The health ministry later confirmed that at least four people including two foreign workers had been killed and 21 wounded over two days of fighting.

The GNA has struggled to impose its authority since arriving in Tripoli in March last year. It has been rejected by factions that control eastern Libya, where military commander Khalifa Haftar has been consolidating his position and installing military-appointed mayors.

As temperatures have climbed this month, parts of western Libya have once again been suffering from power and water cuts that residents have criticised the GNA for failing to resolve.