At least five people have been killed and 35 wounded in nearly a week of fighting in the largest Palestinian camp in Lebanon.

Two members of the Palestinian group Fatah were killed on Wednesday during clashes with other armed groups in the Ain al-Hilweh refugee camp, according to medical sources.

The fighting began last Thursday after the leader of an armed faction sympathetic to the Bilal Badr group fired at the headquarters of the joint security force for the camp.

Since then, fighters have clashed with the joint security force comprising the main Palestinian factions, including Fatah, which is responsible for the camp's security.

READ MORE: Lebanon freezes plan for Ain al-Hilweh's 'racist wall'

The Bilal Badr group has been described by the Lebanese government as an "Islamist group", with a number of factions supporting its wanted leader.

The fighting escalated on Wednesday, when gunfire wounded three people, including two Lebanese security personnel, outside of the camp, according to a security source.

'Turf war'

Al Jazeera's Imtiaz Tyab, reporting from Beirut, said that "essentially, what we are seeing here [Ain al-Hilweh] is a turf war".

"There are people who are trying to fight over these very narrow lanes and streets of this refugee camp, which is home to around 50,000 Palestinian refugees."

The two sides agreed to a ceasefire deal later on Wednesday, but Tyab said such agreements "continue to unravel".

A witness told Reuters news agency that a war calm prevailed over the camp on Wednesday, with parts of the area suffering severe destruction.

Houses were burned, and the camp's water and electricity networks were damaged, other witnesses said.

Al Jazeera's Tyab said that the camp "is a very densely populated and poverty-stricken place that has seen violence consistently for many years now".

Palestinians in Lebanon are not allowed to own land and are prohibited from many professions, leading to a "mix of uncertainty, unrest and poverty", Tyab said.

Palestinians not allowed regular jobs or to own property. Latest fighting underscores how vulnerable refugees are, especially to violence — Imtiaz Tyab (@ImtiazTyab) August 23, 2017

In April, seven people were killed and dozens were injured in similar fighting between the same two groups.

Lebanon's Palestinian camps, which date back to the 1948 war between Israel and its Arab neighbours, largely fall outside the jurisdiction of Lebanese security services.

There are some 450,000 Palestinian refugees living in 12 camps in Lebanon.