Turkey on Wednesday condemned the "shameful assassination" of Hamas political leader Ismail Haniyeh -- an ally of Turkish President Recep Tayyip Erdogan -- the foreign affairs ministry said in a statement.

"We condemn the assassination of the leader of Hamas's political office, Ismail Haniyeh, in a shameful assassination in Tehran," the ministry said, adding that "this attack also aims to spread the Gaza war to a regional dimension".

"We express our condolences to the Palestinian people who have sacrificed hundreds of thousands of martyrs like Haniyeh in order to live in peace in their homeland under the roof of their own state," the ministry added.

"Once again the (Benjamin) Netanyahu government has shown that it has no intention of achieving peace.

"If the international community does not take measures to stop Israel, our region will face much large conflicts."

Haniyeh, who spent much time in Turkey before the October 7 attacks launched by Hamas on Israel, last paid a visit to Erdogan in Istanbul in April.