When Turkish Prime Minister Recep Tayyip Erdogan very publicly condemned President Shimon Peres at the World Economic Forum in Davos and then stalked off the stage in a huff, the incident was blamed on his short temper, and officials in Ankara and in Jerusalem rushed to dispel perceptions of a major crisis between Turkey and Israel. However, Erdogan's seemingly spontaneous outburst was a carefully considered move in Turkey's internal power struggle between the ruling Islamist party AKP and the opposing military establishment, and highlights a major shift in the country's balance of power. The AKP, or Justice and Development Party, is a religious Islamic political party that has been the ruling party in Turkey since 2002. It operates in a special environment, as modern Turkey was founded along strict secular principles, with strong institutions committed to maintaining the separation of mosque and state. Foremost among these are the Turkish armed forces, which have over the past decades forcefully ousted several elected governments that they saw as promoting a religious state, including the Welfare Party, a forerunner of the AKP. Since coming to power, the AKP has maintained that it has no religious agenda, and that it is committed to increased democracy and liberalization of the economy. Critics, however, have consistently held that the AKP is employing democratization and liberalization merely as tools to weaken the anti-religious state mechanisms. In recent years, the AKP has, indeed, taken numerous measures to consolidate its power base and its control of the state, while eroding the political, judicial and military opposition, all within the boundaries of the democratic political process, and often within the context of political reform and increased transparency. The key challenge to the AKP came when it tried to change the law banning religious headscarves for university students. Declared as an overt move against the secular nature of the state, this lead to a legal battle in 2008, during which the secular establishment attempted to disband the AKP through Turkey's Constitutional Court. The AKP mobilized massive popular support throughout Turkey, and the court bid to disband the Islamist party, which had succeeded in removing similar threats to Turkish secularism in the past, failed. Overcoming the judicial watchdog that had defeated its predecessors was a major moral and political victory for the AKP. A key confrontation that took place during the court fracas saw the Turkish military attempt to influence the process by taking a public stance against the ruling party. The military has usually been perceived by the Turkish public as the protector of democracy, and such interventions in the past had been met with approval. To the military establishment's surprise, its move this time gave rise to public opposition across the board, even among traditional supporters of the fight against Islamization, and it had to back down after failing to garner popular support. Erdogan had managed to draw liberals, moderates and the educated middle class to his side by painting the confrontation as a challenge to Turkey's democracy (and a threat to its prospects for EU accession), made by a self-interested military clique that was unaccountable to its citizens. Following its defeat of these crucial challenges in 2008, the AKP has shown increasing confidence, and has now taken the offensive. In an affair that has been shaking the country, the government has alleged a shadowy right-wing conspiracy against it, and has been using controversial evidence and a problematic legal process to arrest scores of its secular political opponents. For the first time, these have included not just civilian opposition (such as journalists, lawyers and university rectors), but also high-ranking military and police personnel, a previously untouchable sector. Turkey's military expressed concern and later expressed outrage, but at present seems incapable and unwilling to attempt any more drastic measures against the government. This backdrop brings us to Erdogan's attack on Israel, which began not at Davos but during the recent fighting in Gaza, when the prime minister issued numerous highly vehement public pronouncements against Israel, employing rhetoric that was harsher than that of many of Israel's fiercest antagonists. Erdogan's attacks on Israel represents the new phase of seeking open confrontations with Turkey's secular watchdogs, albeit in a relatively toned-down manner. For this purpose, Turkey's relationship with Israel is an excellent target. Since 1992, Turkey's military establishment and its professional bureaucracy have pushed for an increasingly warm relationship with Israel, at the expense of Turkey's Arab neighbors, in essence forming a strategic alliance between the two countries. These two institutions, which are also the key challengers to the AKP's rule, are deeply and publicly committed to the relationship with Israel. It should be noted that the Turkish public has a shared bias against Israel: the more traditional and Islamic-oriented masses perceive the Jewish state within the traditional context of the Arab-Israeli conflict, while the educated middle class is open to the demonization of Israel as a war-mongering pariah state that is increasingly accepted among their liberal European counterparts. The choice of Israel as an issue area is therefore well calculated by the AKP, which has learned from the events of the past year that it can rally pro-secular (and hence traditionally pro-military) sections of the Turkish public against the military establishment if the right cause is chosen. The images of death and destruction from Gaza have served as a more than adequate base for Erdogan's one-sided interpretation and rallying cry, and he has succeeded in drawing support from all levels of Turkish society, as evidenced by the pro-Erdogan focus of the heated anti-Israel demonstrations that resulted from his attacks on Israel. Attacks on Israel also play to a specific subset of the Turkish public at large, allowing Erdogan to consolidate the ranks of the "hardcore" Islamist supporters in the country. Until now, the defection by devoted members of the Islamist camp towards more outspoken parties due to frustration with the AKP's moderate policies and seeming reluctance to challenge Turkey's secular establishment has been a constant threat to Erdogan's power base. It should be understood that the key aspect of Erdogan's attacks on Israel is not just in uniting the Turkish public behind him, but in uniting them against the military and the secular establishment. In the public eye, the secular establishment is the key backer of Turkey's warm relationship with Israel. When he condemns Israel, Erdogan is also publicly condemning Turkey's military and civil service. Once again, the previously all-powerful secular establishment finds itself faced with a challenge from the AKP that is backed with popular support from throughout the Turkish public. An intriguing aspect of Erdogan's attacks on Israel is in the introduction of overt religious language into the political debate. The prime minister has made prominent use of religious terms, invoking Allah's punishment upon the Jewish state, thus making another inroad into previously forbidden territory for Turkish politics. Meanwhile, the establishment is occupied primarily with defending the relationship with Israel. Erdogan's attacks have been consistently followed by public statements issued by the country's military and foreign policy officials in which they attempt to douse fears of a major rift between the two allies - assuring, for example, that multi-million dollar purchases of Israeli military equipment will not be cancelled. Since rising to power in 2002, the AKP has been careful to avoid the type of overt action that had in past lead to the downfall of Islamic parties in Turkey. However, increased confidence and a revised balance of power versus the military establishment have combined to foment increasingly overt challenges to the secular watchdogs of Turkey. The public challenge to Turkey's relationship with Israel serves as a perfect issue to further the Islamist cause as the AKP moves to shatter Turkey's decades-old power structure and bring about a fundamental change in the role of religion in the state. (The Begin-Sadat Center for Strategic Studies) Dr. Gil Feiler is a research associate at the Begin-Sadat Center for Strategic Studies specializing in Arab economics, and heads a Middle East business consultancy, www.infoprod.co.il. Edo Harel is an expert on Middle East business and economics.