Hours after Israeli special forces killed Mohammed Assi in a shootout last month in the occupied West Bank, the Palestinian militant groups Hamas and Islamic Jihad both tried to cloak themselves in his legacy.
Underscoring their shared Islamist credentials, the two groups quickly claimed the dead man as one of their own, proud to take responsibility for a Tel Aviv bus bombing in 2012 that he helped carry out and that wounded several Israelis.
The rivalry to monopolize Assi's memory mirrors a much broader competition between the two groups, both of which are deemed terrorist organizations in the West, to attract supporters and kudos in the Palestinian territories.
Hamas, with robust political and military wings, rules the Gaza Strip and is clearly the senior Islamist party. Islamic Jihad has no ambition to govern, but it is quietly putting on muscle and has become the go-to group for both Iran and Syria.
This makes it increasingly dangerous for Israel and a possible threat for Hamas on the Palestinian militant landscape - although the group's exclusive focus on fighting the Jewish state means it is not challenging Hamas for control of Gaza.
"We seek to have a bigger presence in Gaza, the West Bank and in Jerusalem," said Sheikh Nafez Azzam, a member of Islamic Jihad's political bureau who lives in the southern Gaza city of Rafah, on the desert border with Egypt.
Speaking in quiet, considered tones, he refers to Hamas as a brother in the decades-old conflict against old enemy Israel, but says governing Gaza means it has lost some of its focus.
"Hamas's greatest achievements came when they were in the resistance," he said, referring to the confrontation with Israel, which both groups are committed to destroying.
In an eight-day conflagration with Israel last November, Islamic Jihad surprised many Palestinians by becoming the first militant group to fire an Iranian-made missile some 70 km (44 miles) up the coast towards Israel's financial hub, Tel Aviv.
Hamas emulated the feat later in the confrontation.
"Firing a rocket into Tel Aviv is the same as firing a hundred rockets into Ashdod and Beersheba," said Abu Ahmed, a spokesman for Islamic Jihad's armed wing, referring to two Israeli cities near Gaza that were peppered with missiles.
The Tel Aviv rocket caused no damage, but it jolted the laid-back city, which had thought itself to be safe from Gaza, an impoverished enclave that is home to some 1.8 million Palestinians locked in perennial battle with Israel.
"Islamic Jihad is dangerous because to a degree it is uncontrollable," said Yoni Fighel, a retired Israeli army colonel and a senior researcher at the International Policy Institute for Counter-Terrorism in Herzliya.
"It doesn't have to feed all the Palestinians in Gaza, so can be much more flexible and independent (than Hamas)."
The Palestinian Islamic Jihad was set up in the late 1970s by a group of Palestinian students living in Egypt who believed other Islamist groups, such as the Muslim Brotherhood, which spawned Hamas, were too moderate.
The movement took root in the Palestinian refugee camps that dot Gaza and the nearby West Bank - little more than slums and shanty towns full of disaffected youths.
A senior Israeli military official, who declined to be named, estimated that Islamic Jihad had 2,000-3,000 fighters. By comparison, Hamas's armed wing had some 10,000 men to call on, with a further 10,000 in various police units.
Islamic Jihad has previously said it had 8,000 fighters.
"The Palestinian Islamic Jihad is more fanatical than Hamas, but they don't want to become national leaders," the Israeli official said. "Given that, they won't be outflanking Hamas in the near future. Perhaps further down the track."
Islamic Jihad has certainly weathered the unrest that has rattled the Arab world better than Hamas.
Unsettled by the civil war in Syria, Hamas distanced itself from its old allies in Damascus and Tehran. Instead, it rushed to the court of Egypt's new Islamist president, Mohamed Morsi, confident that he would help them consolidate their power.
The ousting of Mursi in July and the arrival of a military-backed government in Cairo has turned Hamas's hopes to dust.
Suspicious of Hamas's links to Morsi's Muslim Brotherhood, Egypt's new rulers scrubbed out a warren of smuggling tunnels that criss-crossed the Gaza-Egypt border, depriving the group of a vital source of income - cash it badly needed after spurning Iran, which used to give it up to $250 million a year.
While Hamas abandoned its offices in Damascus in protest at President Bashar al Assad's sustained assault on mainly Sunni Muslim rebels, Islamic Jihad stayed put in the city.
Like Hamas, Islamic Jihad is a Sunni group, but even as old Sunni-Shi'ite divisions rend the fabric of the Middle East, it has kept close to Shi'ite Iran - and continues to receive Iranian funding put at more than $50 million a year by Israel.
"We are staying out of every Arab crisis," said Sheik Azzam, speaking from a cavernous reception room decorated with small chandeliers and bright, plastic flowers.
"We work only for Palestine and we tailor our relations with others on this basis," he said.
Such single-mindedness has become a hallmark of the group, winning it converts eager to dedicate and sacrifice their lives to confrontation with Israel.
The Israeli official said up to 30 Islamic Jihad fighters died in the November 2012 clashes, but its leaders had escaped unscathed on that occasion. In 1995, an Islamic Jihad founder, Fathi Shkaki, was killed in Malta in a shooting the group blamed on Israel.
Islamic Jihad's fierce motivation was clear in the second Palestinian uprising, or Intifada, which began in 2000, when the group claimed responsibility for more than 40 suicide attacks that killed dozens of Israelis, mainly civilians.
"The Islamic Jihad always maintained a high level of success in suicide attacks because of the organization, the secrecy, the commitment," said Fighel, previously the Israeli governor of Jenin, a West Bank city and Islamic Jihad stronghold.
While Jenin remains a redoubt for the group, its numbers in the West Bank have sharply diminished over the past decade - a result of repeated crackdowns by both the Israeli military and the Western-backed Palestinian Authority (PA).
Hamas seized control of the nearby Gaza Strip from the PA in a civil war in 2007. Since then, it has lived in cautious harmony with Islamic Jihad in the coastal territory.
"The relation with Hamas is at its best level now," said Islamic Jihad's deputy chief, Zeyad al-Nakhala, answering questions via email from his home in Damascus.
Hamas spokesman Fawzi Barhoum said the groups had been coordinating for the past two years and were working in tandem.
Such harmony cannot be taken for granted.
Although Islamic Jihad put its name to last November's ceasefire deal, Israeli officials believe that it might strike out again as soon as its arsenal of missiles is replenished.
Whether Hamas will also want to reopen the Israel front is debatable and a possible source of future friction.
Hamas shares with Islamic Jihad a mistrust of smaller groups in Gaza, some linked to al Qaeda, which take an even harsher line against Israel and Egypt's new anti-Islamist rulers.
For now, peace between Hamas and Islamic Jihad holds.
Though each claimed the slain Assi as its own last month, they finally agreed to share his memory at a funeral where the green Hamas flag fluttered alongside Islamic Jihad's black one.
"With blood and fire, we shall redeem you, oh martyr," the crowd chanted, united, for now, in their common purpose.