Turkish President Recep Tayyip Erdogan on Wednesday refused to condemn Saudi Arabia for its execution of 47 convicts including a prominent Shia cleric, saying it was an "internal legal matter" of the kingdom.
"The executions in Saudi Arabia are an internal legal matter. Whether you approve or not of the decision is a separate issue," Erdogan said in a televised speech, his first reaction to the controversy which has raised tensions between Saudi Arabia and its regional rival Iran.
Erdogan had last month visited Riyadh for talks with King Salman and the political elite, in a new sign of Ankara's warm ties with the kingdom.
Turkey and Saudi Arabia, both overwhelmingly Sunni Muslim powers, share the same vision over the conflict in Syria where they believe only the ousting of President Bashar al-Assad can bring an end to almost five years of civil war.
Meanwhile, tensions have increased between Turkey and Iran, which along with Russia is the key remaining ally of Assad.
The crisis began at the weekend when Saudi Arabia executed prominent cleric and activist Sheikh Nimr al-Nimr as well as 46 other convicts, prompting a furious reaction from Tehran.
Iranian protesters then ransacked the Saudi embassy in Tehran.
Riyadh, Bahrain and Sudan severed relations with Tehran while Kuwait recalled its ambassador.
Erdogan dismissed suggestions that the executions were aimed at provoking tensions with Shia Muslims and also said the attack on the Saudi mission was "unacceptable".
"Only three (of those executed) were Shias," said Erdogan.
He also questioned also "why the world did not react" to the condemnation of "thousands of people to death" following the ousting in Egypt of former president Mohamed Morsi, an ally of Ankara.
Prime Minister Ahmet Davutoglu on Monday urged Iran and Saudi Arabia to calm tensions, saying the hostility between the two key Muslim powers would only further escalate problems in an explosive region.
But Erdogan's comments contrasted with those on Monday by Turkish Deputy Prime Minister Numan Kurtulmus, who is also government spokesman, that "death penalties, especially ones that are politically-motivated, are of no help to making peace in the region."
Turkey formally abolished the death penalty in 2004 as part of its bid to join the EU.