As part of Turkey's objective to play a neutral role in the region, the country tries to be on speaking terms with both Israel and Hamas. From time to time, Israel has suggested Turkey to support Hamas, while in other cases it has opposed the support.
Under the conservative leader Recep Tayyip Erdoğan, Turkey has become a stalwart supporter of the Palestinian militant group Hamas, which rules the Gaza Strip.
Unlike Israel, Turkey has never listed Hamas as a terrorist organisation. In 2010, Prime Minister Recep Tayyip Erdoğan described Hamas as "resistance fighters who are struggling to defend their land". Israel later said that in the same way it condemned the PKK and listed it as a terrorist organization, it expected Turkey to do the same for Hamas. Turkey hosts senior Hamas officials, including Saleh al-Arouri. Hamas head Ismail Haniyeh and former chief Khaled Mashal visit Turkey often.
According to Israel's Shin Bet, Hamas has established a command post in Turkey which it uses to recruit operatives and oversee operations in the Middle East. Hamas' Turkey branch reportedly takes decisions without taking into account the movement as a whole and without involving the Hamas leadership. Hamas has reportedly planned attacks against Israel from Turkey, including the abduction and killing of three Israeli teenagers in 2014. In 2020 Israeli diplomats charged Turkey with furnishing passports and identity cards to Hamas members in Istanbul.
The Turkish government met with Hamas leaders in February 2006, after the organization's victory in the Palestinian elections.