Turkey’s president, Recep Tayyip Erdoğan, has said that “Hitler’s spirit” was resurgent among Israeli officials, while Israel’s prime minister, Benjamin Netanyahu, said Turkey was becoming a “dark dictatorship” as the two regional powers clashed over a new law defining Israel as a Jewish state.

At a meeting with lawmakers from his Justice and Development (AK) party on Tuesday, Erdoğan condemned the nation state law passed in the Knesset last week, which he said mirrored the Nazi obsession with Aryan racial purity.

“This law is evidence that, without doubt, Israel is the most Zionist, fascist, and racist state in the world,” Erdoğan said.

“The Israeli administration’s view to identify those ancient lands as belonging to Jews alone is no different from Hitler’s obsession with the Aryan race,” he added. “The Hitler spirit, which dragged the world into a major disaster, has risen again among some Israeli officials.”

Netanyahu hit back on social media, describing Turkey under Erdoğan as a “dark dictatorship”.

“Erdoğan is massacring Syrians and Kurds and has jailed tens of thousands of his citizens. The fact that the great ‘democrat’ Erdoğan is attacking the nation state law is the greatest compliment for this law.

“Turkey, under Erdoğan’s rule, is becoming a dark dictatorship whereas Israel scrupulously maintains equal rights for all its citizens, both before and after introducing this law,” Netanyahu said in a statement.

The war of words escalated further, withİbrahim Kalın, a top aide to Erdoğan and the presidential spokesman, describing Netanyahu as “the prime minister of a Zionist apartheid state” who lacked the moral authority to lecture the Turkish president.

The spat was the latest in a string of diplomatic crises between the two countries, whose relations have collapsed over Israel’s treatment of the Palestinians and Erdoğan’s adopted role as a leader of global Muslim causes.

Turkey and Israel severed diplomatic ties in 2010 over the MV Mavi Marmara incident, in which Turkish activists on board the vessel were killed during a raid by Israeli commandos while trying to break the naval blockade around the Gaza Strip. Israel had refused to apologise over the incident.

Relations were restored in 2016, but it was a cold peace at best. The two countries continued to clash, particularly over Palestine, with Turkey leading opposition to the Donald Trump administration’s recognition of Jerusalem as the capital of Israel and the decision to move the US embassy there.

In two summit meetings in Istanbul, the Organisation of Islamic Cooperation condemned the decisions that had otherwise earned meek criticism by America’s Arab allies, and declared majority-Arab East Jerusalem as the capital of the Palestinian state.

In May, Ankara asked the Israeli ambassador to leave Turkey “for a while” over the killing of dozens of Palestinian protesters on the anniversary of Israel’s founding.

The Israeli ambassador endured a full security screening in front TV cameras in Istanbul’s Atatürk airport, and Turkey withdrew its ambassador for consultations. Both countries expelled each other’s consuls general. Most trade relations continued unabated.

Turkey had already denounced the nation state law, which defines Israel as a Jewish state, as “racist” after it was approved late last week.