The battle over Turkey's future as a democracy is getting ever nastier. Despite the air of normality in bustling Istanbul, optimists are hard to find.
It is two months since Turkey's highest court agreed to hear a case to close the governing Justice and Development Party (AKP) and ban the prime minister, Recep Tayyip Erdogan, President Abdullah Gül, and 69 other AKP members - including a third of the cabinet - from politics for five years.
Sitting at an outdoor terrace in Istanbul's Taksim square, the commentator Cengiz Çandar describes the situation as a judicial coup. "The government and ruling party are now under a legal siege," he says. At the next table is the local mayor. I wonder if he too is on the list of 71 AKP members. Çandar leans over to ask. The answer is yes and everyone laughs - a surreal moment in this dark political period.
Another closure case is being heard against the Kurdish Democratic Society Party (DTP). Shutting down both would mean disenfranchising 52 per cent of the electorate, including the whole of Turkey's Kurdish south-east.
Polarisation is increasing. "This disagreement divides the closest of friends, husbands from wives," explains Hakan Altinay, head of the Open Society Institute here.
To many this is a fight not between secularism and Islamism, but between old and new power elites, between nationalism and democracy.
Cengiz Çandar sees it as a continuation of last year's power struggle. Protests in May 2007 against the attempted election of Gü - with his headscarf-wearing wife - to the presidency provoked an "e-ultimatum" on the military's website, which triggered early elections. Erdogan triumphed, winning 47 per cent of the vote, and Gü became president last September.
"The traditional power quarters," says Candar, "do not like to see a party with an Islamist background holding the major posts of power." He believes the crisis reflects a new style of Turkish state nationalism led by Ankara's ruling elite. "It is organised and expressed by state institutions, rather than being a popular movement. It is anti-EU, anti-US and, increasingly, isolationist." Meanwhile, the new middle-class businessmen of central Anatolia - Erdogan's heartland - want to take their share of the pie from the old elites of Ankara and Istanbul.
Mehmet Ali Birand, chief CNN-Turk anchorman, says that the court decision will decide who runs the country. "The old Establishment with military backing or the elected representatives - and if the latter then Turkey will be more religious and conservative but it will be nuanced: we are not Iran or Saudi Arabia."
While most liberal commentators condemn the judicial coup, many criticise Erdogan too. The lack of democratic reforms since his electoral victory last year, and his decision in February to focus on a constitutional amendment allowing headscarves to be worn at university - the trigger for the "judicial coup" - are seen as major errors. (The country's highest court upheld the ban on headscarves on 5 June.)
The cosmetic changes recently made to the notorious article 301 of the constitution - used to prosecute writers including Orhan Pamuk and Elif Shafak - and the police violence used against 1 May demonstrators, underpin disenchantment with Erdogan. "There are so many broken hearts," says the columnist Yavuz Baydar.
Turkey's courts have closed many political parties in recent decades, but never a governing party. The court ruling may come as early as July or as late as December. But even if all 39 MPs on the list of 71 AKP members are banned, around 300 sitting AKP MPs will remain. They might form a new party, and appoint a new prime minister - possibly Ali Babacan, the current foreign minister. A general election could follow.
This more "balanced" outcome may receive tacit approval from the powerful military general staff. But some sources in the armed forces suggest the AKP's opponents hope the party will fracture and, helped by a deteriorating economy, fail.
The big question is, how would Erdogan respond? One possibility is that, if banned, he will stand again as an independent. Some say he will continue to lead his party from behind the scenes. Others wonder if he will lead a broad democratic front of popular protests around the country.
Outside influence on the crisis is limited. The EU is hampered by botched membership negotiations; the US, worried about Turkish military incursions into northern Iraq, is reluctant to get involved.
Middle Eastern neighbours are watching, says the commentator Osman Ulagay: "It would be very difficult to explain the closure of the AKP to those in the Islamic world who hoped the party would show that you can combine Islam and democracy."