NEW YORK - Turkish Prime Minister Recep Tayyip Erdogan, who stormed out of the World Economic Forum in Davos this week after a war of words with Israel's President Shimon Peres over the Gaza conflict, says that the world's refusal to give Hamas a chance to become a political player after they won the elections was responsible for the continuing Israeli-Palestinian conflict. "The world has not respected the political will of the Palestinian people," Erdogan said in an interview with Newsweek, emphasizing that Hamas was not an arm of Iran. "Palestine today is an open-air prison", he said, citing Israeli atrocities in Gaza. The prime minister said that on its part, Turkey was trying to be helpful in paving the way towards a Middle East settlement, mediating talks between various players, including Israel and Syria and two years ago0 between Israel and Pakistan in Istanbul. During the tenure of former Pakistan President Pervez Musharraf, Turkey brought the foreign ministers of the two countries together, Erdogan told Newsweek. "In these talks, at least we started the process of coming together. The request came from Pakistan and Israel to bring them together, so we did. The meetings took place for two days in secret about two years ago," he said. Excerpts from Erdogan's interview with Newsweek and The Washington Post's Lally Weymouth: Q: You've been so critical of the recent Israeli operation into Gaza. Some say it's because Israeli Prime Minister Ehud Olmert came to Turkey just before the operation started and didn't tell you about it. Why have you pushed the Turkish-Israeli relationship to its limits? A: [That's] the wrong view. Q: What is the correct view? A: At the request of Syria, we entered a phase of working together with Israel and Syria indirectly to get them to talk with each other. We are mediators in that process. This was an example of how much importance we put on peace in the Middle East. We had done this before with Pakistan and Israel ... During the tenure of [former Pakistani President] Pervez Musharraf, we brought them together in Istanbul: the foreign minister of Israel and the foreign minister of Pakistan. Q: And what happened? A: The meetings took place for two days in secret about two years ago. We also took part in the peace talks between Israel and Palestine. Q: Between Israel and Fatah or Israel and Hamas? A: I'm referring to the Palestinian Authority and President Mahmoud Abbas. On Dec 23 we had a meeting with Prime Minister Olmert in Ankara. On that day we had the fifth round of the unofficial talks between Syria and Israel. That night ... I was talking on the phone to Syrian President Bashar Assad, and I was talking to Olmert in person and also to the Syrian foreign minister. Q: Were you trying to move the process to direct talks between Israel and Syria? A: Yes. Q: And did Bashar Assad agree? A: President Assad from the start had a very positive attitude toward these talks. On that night, we were very close to reaching an agreement between the two parties. It was agreed they were going to talk until the end of the week to come to a [positive] outcome. Q: So you felt you were close to coming to an agreement? A: These talks on that night went on for five or six hours ... When I was talking with Prime Minister Olmert, I said regarding the Palestine-Israeli talks it would not be correct not to include Hamas in the negotiations. They entered the election in Palestine and won the majority of seats in the parliament. But Prime Minister Olmert said he could not do something like that. Moreover during that talk, I said ... that I believed I could be successful in freeing the kidnapped Israeli soldier Gilad Shalit. Q: In order to release the Israeli soldier, did you ask the Israelis to do something for Hamas? A: I said to Prime Minister Olmert that if you want us to mediate in order to get the Israeli soldier freed, we can do this and we believe we can achieve something. But ... once the soldier is free, Israel should [release from jail] Hamas's speaker of parliament and its members of parliament. Q: Why do you have such a close relationship with Hamas, which is an arm of Iran and is run by Khaled Meshal, who lives in Damascus? A: First of all, Hamas is not an arm of Iran. Hamas entered the elections as a political party. If the whole world had given them the chance of becoming a political player, maybe they would not be in a situation like this after the elections that they won. The world has not respected the political will of the Palestinian people. On the one hand, we defend democracy and we try our best to keep democracy in the Middle East, but on the other hand we do not respect the outcome of ... the ballot box. Palestine today is an open-air prison. Hamas, as much as they tried, could not change the situation. Just imagine, you imprison the speaker of a country as well as some ministers of its government and members of its parliament. And then you expect them to sit obediently? Q: It sounds like you and Prime Minister Olmert were on the eve of an actual breakthrough between Israel and Syria. A: I'm sharing my excitement with you. Q: The Israelis have been frustrated that they couldn't talk directly to the Syrians. A: We were trying to be their hope. Olmert's last sentence [as he left] was, "As soon as I get back I will consult with my colleagues and get back to you." As I waited for his response, ... on Dec 27, bombs started falling on Gaza. There had not been any casualties in Israel since the ceasefire of June 2008. The Israelis claim that missiles were being sent [from Gaza]. I asked Prime Minister Olmert, how many people died as a result of those missiles? Since Dec 27 there have been almost 1,300 dead, 6,000 injured, no infrastructure left, no buildings left, everything is damaged, Gaza is a total wreck. It's all closed, under total siege. The United Nations Security Council makes a decision, and Israel announces it does not recognise the decision. I'm not saying that Hamas is a good organisation and makes no mistakes. They have made mistakes. But I am evaluating the end result. Q: Starting now, do you see a role for Turkey? There was a discussion about Turkish troops being part of a peacekeeping force in Gaza. A: This is totally out of the question. Only maybe as observers. It would be a major mistake for us to send security forces. There are those who try to claim that my attitude toward Israel's latest attacks on Gaza is because I'm anti-Semitic or against the Jewish people. Q: And many American Jews are very upset about it. A: And I'm very upset at them. Beginning with the Jews who live in my country, they are witnesses to my attitude toward Jews. As an individual, I have always declared that anti-Semitism is a crime against humanity. As a prime minister I have always been against anti-Semitism and my frustration is against the current Israeli government because they did not act fairly towards us. Q: But I've seen the anti-Semitic signs around Turkey recently ... A: These are individual attempts. Q: But they're very extreme. The Israeli Consulate has been picketed. It's been ugly. A: There have been democratic demonstrations ... There are demonstrations in the United States, even in Israel. Everything we have said is against the current Israeli government, nothing against Jews. In my speeches I have stated very clearly that anyone who even thinks about doing anything against the Jews in Turkey will find me against them. Of course, I'm not going to ask Olmert to write my speeches. Q: Is your relationship with Israel over? A: We have a serious relationship. But the current Israeli government should check itself. They should not exploit this issue for the upcoming elections in Israel. Q: Do you expect President Barack Obama to play a more even-handed role between the Palestinians and the Israelis? A: There is no justice right now. We expect justice from now on.