Turkey’s prime minister, Ahmet Davutoğlu, has compared his Israeli counterpart Binyamin Netanyahu to the Islamist militants whose attacks in Paris left 17 dead, saying both have committed crimes against humanity.

Davutoğlu said Israel’s bombardments of Gaza and its deadly assault on a Turkish-led aid convoy headed there in 2010 were on a par with the Paris attacks, whose dead included shoppers at a Jewish supermarket.

The comments at a news conference escalated a war of words between the former allies: on Wednesday Israel’s far-right foreign minister, Avigdor Lieberman, called the Turkish president, Recep Tayyip Erdoğan, an “antisemitic bully” after Erdoğan criticised Netanyahu’s attendance at a Paris solidarity march on Sunday.

On Thursday Erdoğan’s spokesman issued a statement saying it was Islamophobic and unacceptable for Netanyahu to link the Paris bloodshed to Islam. “The Israeli government must halt its aggressive and racist policies instead of attacking others and sheltering behind antisemitism,” said his spokesman Ibrahim Kalin.

Turkey has condemned the Paris attacks but also warned that rising Islamophobia in Europe risks inflaming unrest.

Davutoğlu also attended the Paris rally, which he said was a march against terrorism. He said on Thursday: “Just as the massacre in Paris committed by terrorists is a crime against humanity, Netanyahu, as the head of the government that kills children playing on the beach with the bombardment of Gaza, destroys thousands of homes … and that massacred our citizens on an aid ship in international waters, has committed crimes against humanity.”

The assault on the aid convoy, in which 10 Turks were killed, ruptured relations between Turkey and Israel, which previously enjoyed close diplomatic and military ties. Trade links remain close.

Israel fought a 50-day war with the Hamas-ruled Gaza Strip last year, during which Israeli shelling and air strikes caused widespread devastation in the territory and Hamas fired thousands of rockets into Israel. More than 2,100 Palestinians died, mostly civilians, Gaza medical officials said, while the Israeli death toll was 73, mostly soldiers.

“If Israel is looking for a bully, it needs to look in the mirror,” said Davutoğlu, whose Islamist-rooted AK party has held power in Turkey for more than a decade. Last October the Israeli defence minister Moshe Yaalon accused Ankara of sponsoring terrorism, citing what he said was a Hamas base of operations in Turkey, and argued that this was incompatible with its membership in Nato.

Davutoğlu also criticised the Turkish secular newspaper Cumhuriyet for publishing excerpts of Charlie Hebdo’s latest edition, saying freedom of the press did not extend to insulting religious values – a crime punishable by jail in Turkey. Prosecutors in Istanbul have opened an investigation into the newspaper’s decision.

“Freedom of press does not include insulting the prophet,” Davutoğlu said. “People who may tolerate insulting an individual will clearly not respond with the same degree when it is against the prophet. Since Turkey has such a sensitivity, publishing a cartoon that aims to insult the prophet is a clear incitement.”

Police secured the premises of Cumhuriyet after threats were made against the newspaper. A Turkish court has ordered four websites that featured an image of Muhammad on the Charlie Hebdo cover to be blocked.

On Wednesday violence erupted at an Islamist paper, Yeni Akit, after it published negative images of Mustafa Kemal Ataturk, who toppled the Ottoman sultan and founded the secular republic in 1923. Ataturk is a national hero for most Turks. Yeni Akit said about 200 nationalists threw eggs and rocks and then tried to storm its offices before police intervened.