Morocco is struggling to balance its alliance with Israel with support for the domestically popular Palestinian cause, an increasingly complex challenge with Israel ruled by its most right-wing government ever.
The North African country normalised its ties with Israel in December 2020, part of a series of deals known as the Abraham Accords, backed by the administration of then-US President Donald Trump.
In exchange, Rabat won a key concession from Washington: recognition of its sovereignty over the disputed Western Sahara, where the Polisario movement seeks independence.
But the move was at odds with a strongly pro-Palestinian public mood in Morocco.
That square has been harder to circle in recent months as violence has surged in the Israel-Palestinian conflict, with the army carrying out deadly raids in the occupied West Bank.
But Rabat has been quick to defend itself.
A case in point is the royal palace's reaction after the opposition Islamist Justice and Development Party (PJD) "deplored" the Foreign Minister Nasser Bourita for allegedly defending Israel publicly, even as it commits "criminal aggression against our Palestinian brothers".
King Mohammed VI's office hit back, accusing the PJD of voicing "irresponsible excesses and dangerous approximations regarding relations" between Morocco and Israel.
"Morocco's position towards the Palestinian question is irreversible," it said, adding that Rabat's foreign relations are the prerogative of the monarch.
- 'Game-changer' -
Rabat regularly reiterates its commitment to Palestinian rights, and the king chairs the international Al-Quds committee, which works to preserve the "Arab-Muslim character" of Jerusalem.
The Palestinian cause continues to draw immense sympathy from Moroccans, and civil society groups have launched a campaign to push back against normalisation.
Yet Moroccan journalist and writer Jamal Amiar argues that "having relations with Israel and supporting the Palestinian cause are not mutually exclusive if we defend the two-state solution."
Rabat officially supports the establishment of a Palestinian state in the West Bank and Gaza, with east Jerusalem as its capital.
Since the 2020 deal, Morocco's ties with Israel have developed fast, with Rabat buying advanced drones and other military equipment as well as cybersecurity products.
"The Abraham Accords were a game changer, and a lot of things are rapidly changing", Amiar said.
Amiar said Rabat's "partnership with Israel is based on common security interests and long-standing relations that have helped build trust".
But some observers have warned of an arms race between Morocco and its regional arch-rival Algeria, which backs both the Palestinians and the Polisario.
Algiers cut ties with Morocco months after the Israel deal citing "hostile acts".
- Normalisation, with conditions -
Moroccan-Israeli cooperation is growing in other areas too.
Bilateral trade grew by a third in 2022, while some 200,000 Israelis visited Morocco, according to official figures.
Some 700,000 Israelis are of Moroccan descent, and many have maintained strong ties.
"This human and cultural link reinforces the idea of consolidating the link with the Jewish state, regardless of the political and geopolitical situation," said Zakaria Abouddahab, professor of international relations at Mohammed V University in Rabat.
But the rise of ultra-nationalist Israeli parties, which brought veteran hawk Prime Minister Benjamin Netanyahu back to power in December, has threatened to undermine deeper ties.
Israeli Finance Minister Bezalel Smotrich's comment this month that "there are no Palestinians" sparked criticism, including from Israel's ally Washington.
Bourita responded by saying that "Morocco rejects any attitude that could have a negative impact".
Amiar admits that "any prolonged deterioration in relations between Israelis and Palestinians on the ground, in the West Bank or in Gaza, can only negatively impact public opinion on Israeli-Moroccan relations."
"Moroccan society at large will not support normalisation that could harm the Palestinian cause," he said.
That raises the question of whether clashes in the Israeli-occupied West Bank or Jerusalem could shake the foundations of the Abraham Accords.
Reflecting the challenges, the Negev Summit has been postponed; a forum in Morocco that was due this month to bring together foreign ministers from Israel and four Arab nations -- Bahrain, Egypt, Morocco and the United Arab Emirates -- as well as the United States.
"In this context of turbulence, aggravated by a complicated situation in the Middle East... it's hard to predict what will happen," Abouddahab said.