What is behind Turkey's staunch support for Hamas in Gaza?
On the first day of the year, tens of thousands of Turks poured on to the streets of Istanbul, chanting "Murderer Israel, get out of Palestine".
It was not the first massive pro-Palestinian rally in Turkey since the start of Israel-Gaza war on 7 October.
But Monday's mass protest followed incendiary remarks by Turkish President Recep Tayyip Erdogan.
Since he first came to power more than 20 years ago, Turkey has been a staunch supporter of the Palestinians, including Hamas.
But even by Mr Erdogan's standards, the rhetoric was extreme. What Israel's prime minister was doing in Gaza, he said, "is not any less than what Hitler did".
Israeli PM Benjamin Netanyahu hit back, saying "Erdogan, who commits genocide against the Kurds, who holds a world record for imprisoning journalists who oppose his rule, is the last person who can preach morality to us".
Mr Erdogan has made comparisons with Nazi Germany in the past, but the current war of words has put into sharp focus just how bitter Turkish-Israeli relations have become, just months after a significant upturn.
In the latest broadside against Israel, Turkey announced on Tuesday that it had detained 33 people suspected of working for Israeli intelligence service Mossad in raids across eight provinces.
The operation, carried out with Turkey's MIT intelligence agency, followed reports that Israel intended to hunt down members of Hamas abroad, including in Turkey.
Turkey has stepped up support for Gaza since 7 October, for example bringing dozens of patients from Gaza to Turkey for treatment. Turkey's health minister himself accompanied the casualties en route from Egypt.
When Hamas attacked Israel, Mr Erdogan used relatively measured language, urging both sides to remain calm. But as Israel's military response intensified, his rhetoric became increasingly fierce, calling Hamas "freedom fighters" and Israel's actions "genocide".
This hostility to Israel plays to President Erdogan's support base in Turkey, says Helin Sari Ertem, Associate Professor of International Relations at Istanbul Medeniyet University.
"Palestine has long been a cause for Turkey and the Turkish people, covering almost all political tendencies," she says. "Consequently, it is not possible for Turkish governments to consider the Palestine-Israeli conflict only as a foreign policy issue; as it definitely is a game-changer in domestic politics."
Warming to Hamas
In the second half of the 20th Century, Israel and Turkey enjoyed close economic and strategic relationships. Turkey was also the first country in the region to formally recognise Israel after it was founded.
But it was not long after Recep Tayyip Erdogan came to office in 2002 that relations with Israel deteriorated while those with Hamas improved. In 2006, then-Hamas leader Khaled Meshaal visited Turkey following an invitation from Mr Erdogan. Hamas had by then been designated a terrorist group by Israel, the US and the EU, amongst others.
The first diplomatic crisis between Israel and Turkey played out before a world audience when in 2009, Mr Erdogan stormed out of a meeting during the World Economic Forum in Davos after a clash with Israel's then-President Shimon Peres over Israeli air strikes in Gaza.
The Turkish leader vowed to never go back to Davos - and he has not returned since.
But just a year later tensions reached breaking point when a ship, the Mavi Marmara, sailed from Istanbul to Gaza leading a flotilla of boats carrying volunteers and humanitarian aid to challenge Israel's maritime blockade of the Gaza Strip.
When the Mavi Marmara refused to halt, Israeli commandos raided it in international waters and 10 Turkish citizens on board were killed in ensuing clashes. The incident led Turkey to suspend diplomatic relations with Israel for several years.
According to Ms Sari Ertem, Turkey's pivot away from Israel and towards the Palestinians is due to the conservative and pro-Islamic grassroots of Mr Erdogan's AKP party.
While Mr Erdogan's support for the Palestinians is sincere, she says it also aimed at calming down the conservative-nationalist political groups, which did not see sufficient reaction from the AKP in the first days of the war.
The head of the main opposition Republican People's Party in Turkey, Ozgur Ozel, called on the international community to act for Gaza, and the leader of the second biggest opposition party, Meral Aksener, has branded the Israeli prime minister a "terrorist".
However, this support for Hamas has come at a cost for Turkey.
Turkey's frayed relationship with Israel was restored only last year and then, within months of both countries reappointing their ambassadors, the war erupted. Turkey recalled its ambassador, and Israel's envoy returned out of security concerns.
Giorgio Cafiero, CEO of Gulf State Analytics, a Washington DC-based geopolitical risk consultancy, says President Erdogan is unlikely to change path.
"He has his domestic supporters and constituents, and he can't ignore such pressure coming from within Turkey and his base," Mr Cafiero argues.
He also says the president cannot ignore his desire to be considered as a strong Muslim leader.
"Erdogan is a respected head of state throughout the wider Islamic world, and he has regional and international supporters, too."
Despite the rupture between the two countries, Ms Sarı Ertem believes it will not be too damaging.
"The anti-Israeli discourse, which becomes very much visible especially at times of serious civilian casualties caused by Israel on the Palestinian side, rarely disrupts the traditional Turkish foreign policy approach, which favours a balancing act," she says.
"It has always continued its relations with Israel at least economically, if not politically. Turkish-Israeli relations have proved to be quite resilient despite all the ups and downs during history."
Correction 4 January 2024: This article has been amended to make clear that the Mavi Mamara boat was leading a flotilla of boats carrying aid, rather than carrying aid itself.
More on Israel-Gaza war
- Follow live: Latest updates
- Gaza: How much damage has been done?
- History behind the story: The Israel-Palestinian conflict
- Israel's borders explained in maps