Turkish security forces this month detained dozens of people across the country accused of spying for Israel. The highly publicised raids are seen as a warning to Israel not to target Palestinians on Turkish soil, after Ankara insisted it would itself reign in anyone suspected of involvement in the 7 October Hamas attacks.
At the beginning of January, homes across Turkey were raided in a major operation against alleged spy rings working for Israel's Mossad intelligence service.
A Turkish court formally charged 15 people with espionage offences, while eight others were deported.
In an address to Turkey's MIT intelligence agency, President Recep Tayyip Erdogan boasted: "Our intelligence service, which unearthed the spy network for Israel in our country, has given the best response to those threatening us."
He also warned Israel of more to come.
"This has surprised Israel. But wait ... this is only the first step. You will get to know Turkey. You don't yet, but you will have to," Erdogan said.
The arrests follow the Turkish president's warning of "serious consequences" if Israel sought to hunt down members of Hamas on Turkish territory.
"It's very clear from the threats of Israelis that Turkey [has been] selected as a venue for attacks on Hamas," according to Murat Aslan, a senior security analyst for the Foundation for Political, Economic and Social Research, an Ankara-based think tank.
"In this case, Turkish intelligence at the very first instance – and by the words of the president – warned Israeli intelligence in Ankara that there must be no action," Aslan said.
"But right after this warning – a political warning – [Turkey's] intelligence organisation identified activated cells of Mossad in Turkey."
Israel eyes Turkey as Hamas haven
Israel has not commented on the arrests, but Israeli military leaders and government ministers are vowing to track down those involved in Hamas's 7 October attack on Israel.
"We are inflicting severe damage on Hamas, damaging the leadership of Hamas, targeting the commanders, targeting the terrorists, destroying Hamas' infrastructure in Gaza," claimed Israel's army chief Herzi Halevi.
"We are also constantly ready for other areas. We know how to reach Hamas anywhere in the Middle East," he said.
Erdogan frequently organises rallies in support of Hamas, which he calls a "liberation movement".
According to Gallia Lindenstrauss, an analyst with the Institute for National Security Studies in Tel Aviv, Turkey is viewed as a likely location for Israel's hunt for those involved in the October attacks.
"When we see the massacres of 7 October, how they occurred and how well they were planned, obviously there was a lot of assistance from the outside ... A lot of things were coming from outside of Gaza into Gaza," Lindenstrauss argued.
"Some of this obviously came through Turkey – not by the Turkish government, but by Turkish security authorities not paying enough attention what was happening.
"Turkey is not happy when foreign countries try to undermine these [militant] activities in ways that might harm its sovereignty. But as long as Turkey allows all this activity on its soil, there are ramifications," she said.
Turkey determined to avoid spillover
It's not the first time Turkey's MIT intelligence agency has clashed with Israel's Mossad.
But these two formidable intelligence services have also worked together in recent years.
"We definitely did see good cooperation between Mossad and MIT," said Lindenstrauss. "And there was the foiling of a supposedly imminent attack against Israelis on Turkish soil in 2022. So these organisations are also known to cooperate. I think they have great respect for each other."
Last month, Turkish authorities arrested alleged Islamic State members accused of planning attacks on synagogues.
As the war in Gaza continues, Ankara is determined to prevent the conflict from coming to Turkey.
"Any attack on any other third nationality in Turkey has a bad connotation ... [it] is a negative development for Turkey, because of tourism and business links," explained analyst Aslan.
"Turkey does not want to be a playground for intelligence organisations. So that's why I think Turkish intelligence increased its activity to identify exactly who is involved in what."
Turkey has witnessed terror attacks and assassinations in the past, dealing a heavy blow to tourism and the broader economy.
Ankara's determination not to let the Middle East war spill over onto the streets of Turkey means more crackdowns on foreign intelligence service operations are likely.