By David O'Byrne
BBC News, Istanbul
The recent royal visit to Turkey highlighted the headscarf issue
Turkey faces a long, hot and potentially tense summer after the constitutional court voted to overturn an amendment which would have allowed female students to wear Islamic headscarves on university campuses.
The decision on Thursday is a serious blow for the government of Prime Minister Tayip Erdogan, which passed the amendment earlier this year, fulfilling a promise he made to the electorate when first elected to office nearly six years ago.
Although voted through by a two-thirds majority in the Turkish parliament, the change has been strongly opposed by Turkey's secular elite, who have been quick to back the court's decision.
Deniz Baykal, the leader of the main opposition Republican People's Party which filed the legal action against the amendment, called the decision "important and just" while General Yasar Buyukanit, the head of Turkey's powerful military, commented that the decision "must be respected".
Reactions from within Mr Erdogan's AK Party (AKP) have been mixed.
Bekir Bozdag, the head of the AKP's parliamentary group, described the court ruling as "against the constitution" and accused the court of "exceeding its authority".
But other senior party figures, including Mr Erdogan himself, and the Turkish President Abdullah Gul have chosen not to comment.
Having lost this case, their attentions are likely already focused on another ongoing legal action calling for the closure of their party and the banning from office of 71 senior party members, including Mr Erdogan and Mr Gul.
That case was launched in March by senior state prosecutor Abdurrahman Yalcinkaya, who alleges that the AKP poses a threat to Turkey's secular democracy.
It cites the constitutional amendment allowing girls to wear headscarves to university as evidence.
The courts are expected to take their time delivering a ruling on whether it will close the party down and no decision is expected before September or October.
Although publicly the AKP continues to defend itself against the allegations, they recently abandoned plans to amend the constitution again to end the right of the courts to close down political parties.
The move to allow the headscarf in universities has prompted protests
Privately, party officials complain that they are faced by forces they cannot compete with and accept that closure is inevitable.
Many expect that a new party will be founded and the bulk of the AK Party's majority parliamentary group enrolled as members even before the court ruling is announced.
However, few expect that the transition to a new party and a new government can be done smoothly given the exclusion of the existing party's key leadership figures.
Some even predict that the result may be an early general election, little over a year after the AK Party was swept back to power with 47% of the vote.
The effects of the possible closure of the governing political party are already being felt in Turkey.
Mr Erdogan complained last month that the ongoing court case had already cost the country more than $13bn in lost foreign investment.
Economists agree that the uncertainty brought by the closure case has contributed significantly to the recent downturn in the Turkish economy.
They also warned that coming on top of the current global credit crisis, continued instability could cause serious damage.
With Turkish voters traditionally casting their votes based on a government's economic performance, the results of possible early elections are likely to reflect any negative effects instability may bring.
The only question is who they will hold responsible - Mr Erdogan and his AK Party for attempting to face down Turkey's secular elite over the issue of headscarves, or the elite itself.