Hamas chief Khaled Meshaal on Saturday praised Turkey as a "source of power" for all Muslims in gratitude to Turkey's leaders for supporting the "Palestinian cause".
"A democratic, stable and developed Turkey is a source of power for all Muslims," Meshaal said in an address to the ruling Justice and Development Party (AKP) annual congress in the conservative central Anatolian city of Konya.
Meshaal said a "strong Turkey means a strong Jerusalem, a strong Palestine," voicing hopes to "liberate Palestine and Jerusalem," according to the state-run Anatolia news agency.
His brief address was interrupted repeatedly by cheering crowds in the hall waving Turkish and Palestinian flags and chanting: "Allahu Akbar (God is greatest)" and "Down with Israel!"
The Hamas chief often shows up at the ruling party's events. He also attended the AKP's congress in 2012 when Islamist President Recep Tayyip Erdogan was serving as prime minister.
Current Prime Minister Ahmet Davutoglu, in his speech said Turkey's red flag featuring a crescent with a star was a "symbol of the innocent in the world."
"God is witness... we will make this red flag a symbol of the innocent. This red flag will fly side by side with the flags of Palestine, free Syria and all other innocents' flags anywhere in the world," he told the congress.
Turkey's leaders, in particular Erdogan, are known for their angry outbursts against Israel. A staunch supporter of the Islamist Hamas terrorist group, Erdogan has often blasted the Jewish state over its military operations against terrorists based in the Gaza Strip, which is ruled by Hamas.
Under Erdogan's rule, and particularly in recent years, Turkey has become home to one of the most active Hamas branches in the world. Among the Hamas terrorist masterminds currently based there is Salah al-Arouri, who claimed responsibility for ordering the kidnap and murder of three Israeli teenagers in June of this year.
In response, Israel has turned to NATO - which Turkey is a member of - to take steps against Ankara for its open support for terrorism.
AFP contributed to this report.