By repeatedly hitting out at the US move to recognise Jerusalem as Israel's capital, President Recep Tayyip Erdogan may be catering to his voter base, but he risks sabotaging Turkey's already fragile relations with the Jewish state.
While President Donald Trump's decision last week was met with near-universal condemnation, particularly from the Muslim world, Erdogan has emerged as its most outspoken critic.
Following Trump's decision to recognise Jerusalem as Israel's capital and to move the embassy there, Erdogan has levelled a string of accusations against Israel and the US, in his usual strident style.
Among other things he said Israel was a "terrorist state" that kills Palestinian children, adding that the US had "become a partner to this bloodshed".
Such sentiments echo those held by many among Erdogan's traditional voter base of Sunni Muslims in Turkey. His statements have also galvanised his popularity among some Muslims in the Arab world.
Israeli Prime Minister Benjamin Netanyahu responded to Erdogan, saying he was "not used to receiving lectures about morality from a leader who bombs Kurdish villagers in his native Turkey, who jails journalists, who helps Iran go around international sanctions, and who helps terrorists, including in Gaza".
Erdogan, who considers himself a fervent supporter of the Palestinians, will hold a summit of leaders of Muslim countries on Wednesday, which he claimed will mark a "turning point" in the response to Washington's decision.
Traditional heavyweights of the Middle East like Saudi Arabia and Egypt have condemned the move, but without announcing any concrete measures of their own.
- 'Serious risk' -
Erdogan, who comes from a conservative Islamist background, frequently criticises Israel and does not conceal his support for the Palestinian Islamist movement Hamas, listed as a terrorist organisation by the US, Israel and several countries around the world.
His statements have been "consistent with the prevailing feelings among his own followers inside Turkey", said Marc Pierini, visiting scholar at Carnegie Europe and former EU ambassador to Turkey.
But Erdogan's escalation comes as Turkey and Israel are working to normalise ties since last year after a near-break in relations triggered by Israel's storming of a Gaza-bound ship in 2010 which left 10 Turkish activists dead.
"Given the Israeli reaction to these statements, there is indeed a serious risk for Turkey-Israel normalisation. I think this is a risk that both sides are ready to take," Pierini said.
According to Aaron Stein, resident senior fellow at the Atlantic Council's Rafik Hariri Centre, Erdogan is already thinking about elections scheduled for November 2019 when he is expected to run for a new term as president with boosted powers under an executive presidency approved in an April referendum.
By taking a firm stand against the Jerusalem move, it is "part of his broader effort to paint himself as the protector of oppressed Muslims around the world," Stein added.
"The two sides don't like each other, but are not standing in the way of normal economic relations. I think this is likely to continue, given Erdogan's political calculations and Netanyahu's own legal and political problems," he added.
- 'Domestic considerations prevail' -
Sinan Ulgen, chairman of the Istanbul-based Centre for Economics and Foreign Policy and visiting scholar at Carnegie Europe, believes that Erdogan's rhetoric on Jerusalem more broadly reflects a shift in Turkey's foreign policy approach since the arrival of the Islamic-rooted Justice and Development Party (AKP) in 2002.
"Traditionally, Turkey was able, in its diplomatic practice, to operate more in isolation from domestic political considerations," Ulgen said.
"This has changed under AKP rule so that Turkey finds itself at almost another extreme where most foreign policy decisions are driven by domestic calculations."
Ulgen said that it was from this perspective that Turkey's efforts to lead the campaign against the US move should be read.
Erdogan "believes that there is public support at home to justify this more aggressive rhetoric against Israel", even if it risks provoking a new diplomatic crisis, Ulgen said.
"One more time, domestic considerations tend to prevail over more cautious diplomatic practice."