Until this Wednesday, the sound of mortar and rifle fire has echoed across the streets of the southern Lebanese city of Sidon. As usual, the world has ignored it on the grounds that Palestinians have been fighting Palestinians yet again in the largest refugee camp in Lebanon. And so they have.

Palestinian secular factions have been fighting Islamist groups. The camp lies just to the east of the centre of Sidon and is the usual warren of poverty and concrete huts and filthy apartment blocks, ironically called Ein el-Helweh – which means the “sweet well” or “sweet spring”.

Few noticed that this latest series of battles was set off shortly after an official visit to Lebanon by Mahmoud Abbas, the doddering old Palestinian president who long ago lost his legal electoral mandate in the occupied West Bank but who remarked before he left Beirut that Palestinians were dedicated to crushing “terrorism”.

Yet again, nobody took him very seriously. In fact, he was in earnest. What he really came to Lebanon to arrange was an all-out struggle by Fatah – the same Fatah which Abbas himself represents – and other groups against a small but alarmingly active bunch of Islamist Palestinians and Lebanese who had taken over the al-Tiri suburb of Ein el-Helweh.

They are – or were – led by a man called Bilal Badr, who in the past few hours appears to have settled in a different area of the camp under the protection of Fatah el-Islam, whose leader is another gang leader called Osama el-Shehabi.

His Sunni Muslim Fatah el-Islam (“Conquest of Islam”) was responsible for a series of Isis-like assaults on the Lebanese army in the north of the country in 2007 – a number of soldiers had their throats cut with knives – and its black and white flag has a hauntingly similar design to that of the real Isis.

The fact that Isis’s own flags do actually hang in several of Ein el-Helwe’s streets – as they have briefly in the northern Sunni Muslim city of Tripoli – only makes the situation more disturbing. Many Palestinian suicide bombers have in the past set off from Ein-el-Helweh for Iraq and have actually died attacking the Americans there.

So what is actually going on in Lebanon? Put simply, the country’s security services – infinitely more efficient than you might suppose for a country smaller than Wales – are able to handle Tripoli’s Islamist rogues and keep a close eye on Sunni areas of Beirut.

But Ein el-Helweh is supposed to be run by the Palestinians who live there, which is why the Lebanese army recently built a wall around the camp. Then Abbas turned up to promise that his men would deal with the Isis-type groups in the camp. The Lebanese would handle their own Isis supporters elsewhere.

Unfortunately for Abbas, however, his men did not catch Bilal Badr and the fighting ended in a typical ceasefire; for fear of killing too many civilians, both sides agreed to stop shooting while Badr moved to a new hovel elsewhere in Ein el-Helweh.

If all this appears to be arcane stuff, it is not. General Abbas Ibrahim’s general security service in Lebanon has been steadily arresting “terrorists” in various parts of the north and, more recently, in Beirut.

There is good reason, for example, to believe that not many weeks ago, they managed to arrest a man who was planning a suicide bombing at Costa Café in Hamra Street (where your correspondent occasionally takes a morning coffee).

Along the Corniche outside my home, groups of “tourist” police on bicycles and dressed in bright blue shirts and short trousers pedal regularly through the crowds strolling beside the Mediterranean.

But the cops have nothing to do with tourism; they are part of the state security apparatus watching for Isis. The same guys, in civilian clothes, can be spotted at night in the downtown cinema complex in central Beirut, the part of the capital rebuilt after the civil war by the Solidere company.

Not long ago, local papers reported that an employee of Solidere had been arrested in January for giving Isis – the real Isis this time – targets for suicide bombings. The story was wrong.

Mustafa Safadi did not work for Solidere. But he was discovered in a still-unfinished apartment complex – also not owned by Solidere, but in the downtown district – called Beirut Terraces. It’s not far from the parliament buildings and it’s believed he was following the movements of Lebanese politicians.

According to al-Akhbar, a Beirut tabloid founded by a former journalist belonging to the prestigious An Nahar newspaper, Safadi’s brother left Lebanon via Turkey for Syria, where he took up directly with Isis just after its capture of Mosul in 2014. And here the tale begins to darken.

The brother tried to persuade Safadi to follow him to Syria and join Isis, and Safadi then travelled – and here the reader will get the point of this distressing tale – from Beirut to Ein el-Helweh camp to meet a Palestinian named as Mahmoud Rahim who, like Safadi, is now under arrest.

Safadi apparently asked Rahim how to reach rebel-held Syria but decided to stay in Lebanon.

It was Rahim, allegedly, who told Safadi to search for details of the movements of parliamentary deputies. This is a serious matter since former prime minister Rafiq Hariri was assassinated close to the centre of Beirut 12 years ago while travelling home from the parliament building.

A former “emir” of Isis inside Ein el-Helweh, a man called Imad Yassin, had actually recruited Safadi’s brother as well as a cousin who was subsequently killed in Iraq. Yassin, according to al-Akhbar, was also in contact with a Palestinian identified as Ziad Jahoush, another Isis member (also in custody) and Bahiedin Hojeir who was accused of involvement in a suicide attack against the Iranian embassy in Beirut in November of 2013.

Marine Le Pen walks out of meeting with Lebanon's Grand Mufti after refusing to wear headscarf

Safadi has allegedly told Lebanese investigators that he was asked if he himself wished to be a suicide bomber and was told to contact Palestinians who could help him in this grisly project. He was told to meet them in a house in Ein el-Helweh. Safadi apparently turned up – only to find the house empty.

All of which provides a fascinating insight into the sudden enthusiasm of Palestinian president Mahmoud Abbas to get his Fatah fighters into battle against the Islamists of the camp outside Sidon. Alas for the old boy, the Islamists remain largely untouched in Ein el-Helweh. All of which means that the Lebanese security guys are watching the camp very closely.

General Ibrahim, who has spent much time trying to negotiate (with the help of Qatar) the freedom of several Lebanese soldiers still held hostage by Isis – again, we are talking about the real Isis – near the Lebanese-Syrian border, is no amateur.

When he was head of Lebanese army intelligence in southern Lebanon, he walked – alone and unarmed – into the Ein el-Helweh camp at night to speak to al-Qaeda fighters.