TRIPOLI (Reuters) - Gunfire could be heard over Tripoli on Thursday as armed groups mobilized heavy weapons and took up positions in several parts of the Libyan capital.

Militias that hold effective power across the city clash frequently, but the shooting was heavier than usual and tanks and armed convoys could be seen in some areas.

The immediate cause of the latest violence was not clear.

Tripoli is controlled by a patchwork of armed groups, some with a quasi official status. Fighting is often sparked by turf wars or revenge attacks, while armed groups are also divided between those that support a U.N.-backed government that arrived in the capital in March and those that oppose it.

After the 2011 uprising against Muammar Gaddafi, Libya splintered into rival fiefdoms controlled by groups originally made up of former rebels.

Rival alliances fought for control of the capital in 2014, after which competing governments and parliaments were set up in Tripoli and the east.

The U.N.-backed Government of National Accord (GNA) was tasked with uniting Libya’s warring factions but has struggled to assert its authority in Tripoli and has been rejected by power brokers in the east.

Recently the government it displaced in Tripoli has attempted a comeback, regaining control of the Rixos hotel, which was meant to house a new legislative body under the deal that created the GNA.

Military vehicles were seen mobilizing near the Rixos on Thursday and shops in the area closed amid rising tension. Military vehicles including tanks could also be seen in Bab Benghashir and Abu Salim neighborhoods, while clashes were reported in Abu Salim and Hadba districts.

The city center was calm but residents were rushing to do shopping and head home before nightfall.

The French Foreign Ministry issued a statement saying France was “very worried by the escalation of violence between armed groups in Tripoli”.

“(France) is in close contact with (GNA) Prime Minister Fayez Seraj and supports his efforts to restore the authority of the state, especially in Tripoli,” the statement said.

There was also fighting on Thursday in Libya’s second city, Benghazi, where forces loyal to eastern commander Khalifa Haftar have been waging a military campaign against Islamists and other opponents for more than two years.

There were sporadic clashes and air raids around the besieged district of Ganfouda, one of the last holdouts against Haftar’s Libyan National Army (LNA). The LNA launched its latest assault on the area on Wednesday.

A medical official said 11 men from the LNA had been killed and 36 wounded in two days of fighting.