The AK party which was re-elected with 47 per cent of the vote last year, had denied charges of violating the secular constitution.

The case first reached the court in March and final deliberations had begun on Monday.

Recep Tayyip Erdogan, Turkey's prime minister, said the ruling had removed the uncertainty that the country had been facing, but that Turkey had suffered a serious loss of time and energy due to the case.

In his first remarks since the court's decision, Erdogan said his party would continue to uphold the country's secular values.

"The Justice and Development party, which has never been a focal point of anti-secular activities, will continue to defend the basic principles of the republic," he said.

Public debate

Hoda Abdel-Hamid, Al Jazeera's correspondent in Ankara, the Turkish capital, said the case had triggered an intense debate in the country over the past month, revealing a much deeper issue.

"It reflected a more profound problem within Turkish society... how to have the overwhelming masses, who are religiously sensitive without being fundamentalist - and without wanting to change the secular tenants of this state - be able to co-habitate with the secular elite who are extremely afraid that the AK Party will slowly try to Islamise society.

"That would be a process that would be irreversible," she said.

Fadi Hakura, a Turkish analyst with the London-based Royal Institute of International Affairs, said that the government could face a crisis again if it continued pursuing what he said was their previous agenda of more religion.

"Even if the party was banned this time around, it would have been seen as the last time that such an event could take place in Turkey. Turkey is changing," Hakura said.

"It's becoming much more of a pluralistic society and so any kind of military intervention is now more frowned upon by the public.

"Turkey is also now much more exposed to international financial markets, is involved in the European Union accession process and in regional engagement in the Middle East."

The EU had criticised the case, saying the kind of charges raised by the prosecutor should have been debated in parliament and decided through the ballot box, not in the courtroom.

Financial markets had rallied on optimism over the past week that the court would decide not to ban the party.

The lira rose as much as two per cent against the dollar and shares gained four per cent.