Ismail Haniyeh, the Hamas leader who was assassinated in Iran, was the tough-talking face of the Palestinian resistance group's international diplomacy as Israel's war raged back in Gaza, where three of his sons were killed in an Israeli airstrike.
But he was seen by many diplomats as a moderate compared to the more hardline members of the Palestinian group inside Gaza.
Appointed to the Hamas top job in 2017, Haniyeh moved between Türkiye and Qatar's capital Doha, escaping the travel curbs of blockaded Gaza. This enabled him to act as a negotiator in ceasefire talks or to talk to Iran.
"All the agreements of normalisation that you (Arab states) signed with (Israel) will not end this conflict," Haniyeh declared on Qatar-based Al Jazeera television shortly after Hamas fighters launched the October 7 raid.
Israel's response to Hamas' attack has killed more than 35,000 people inside Gaza so far, according to health authorities in the territory, as the worldwide protests denounced the Israeli war as a "genocide" against Palestinians.
How Haniyeh entered politics?
As a young man, Haniyeh was a student activist at the Islamic University in Gaza City. He joined Hamas when it was created in the First Palestinian Intifada in 1987.
He was arrested and briefly deported.
Haniyeh built a close relationship with Hamas' founder, Sheikh Ahmad Yassin, who, like Haniyeh's family, was a refugee from the village of Al Jura near Ashkelon.
In 1994, he told the Reuters news agency that Yassin was a model for young Palestinians, saying: "We learned from his love of Islam and sacrifice for this Islam and not to kneel down to these tyrants and despots."
By 2003 he was a trusted Yassin aide, photographed in Yassin's Gaza home holding a phone to the almost completely paralysed Hamas founder's ear so that he could take part in a conversation.
Yassin was assassinated by Israel in 2004.
Haniyeh was an early advocate of Hamas entering politics. In 1994, he said that forming a political party "would enable Hamas to deal with emerging developments".
Initially overruled by the Hamas leadership, it was later approved, and Haniyeh became Palestinian prime minister after the group won Palestinian parliamentary elections in 2006, a year after Israel's military withdrew from Gaza.
The group took control of Gaza in 2007.
In 2012, when asked by reporters if Hamas had abandoned the armed struggle against Israeli occupation of Palestinian land, Haniyeh replied, "Of course, not" and said resistance would continue "in all forms - popular resistance, political, diplomatic and military resistance".
'Political and diplomatic front of Hamas'
When Haniyeh left Gaza in 2017, Haniyeh was succeeded by Yahya Sinwar, a hardliner who spent more than two decades in Israeli prisons and whom Haniyeh had welcomed back to Gaza in 2011 after a prisoner exchange.
"Haniyeh is leading the political battle for Hamas with Arab governments," Adeeb Ziadeh, a specialist in Palestinian affairs at Qatar University, said before his death, adding that he had close ties with more hardline figures in the group and the military wing.
"He is the political and diplomatic front of Hamas," Ziadeh said.
Haniyeh and Meshaal had met officials in Egypt, which has also mediated the ceasefire talks. Iranian state media reported that Haniyeh travelled to Tehran in early November to meet Iran's supreme leader, Ali Khamenei.
Three senior officials told Reuters that Khamenei had told the Hamas leader in that meeting that Iran would not enter the war having not been told about it in advance.
Children and grandchildren killed in Israeli airstrike
Haniyeh lost about 60 members of his family who had been killed since Israel's war on Gaza started on October 7.
Three of Haniyeh's sons - Hazem, Amir and Mohammad - were killed on April 10 when an Israeli air strike struck the car they were driving, Hamas said.
Haniyeh also lost four of his grandchildren, three girls and a boy, in the attack.
Haniyeh had denied Israeli assertions that his sons were fighters for the group and said, "The interests of the Palestinian people are placed ahead of everything" when asked if their killing would impact truce talks.
"If the criminal enemy thinks that targeting my family will make us change our position and affect our resistance, then he is deluding himself because every martyr in Gaza and Palestine is from my family," Haniyeh said.
"The blood of our martyrs demands that we do not compromise, that we do not change, that we do not weaken, but that we continue on our path with determination."
➤ Click here to follow our WhatsApp channel for more stories.