The EU has expressed relief at the decision by Turkey's Constitutional Court's not to ban the ruling AK Party.
"This is a good day for Turkey and for Europe," EU Enlargement Commissioner Olli Rehn told Reuters news agency.
He urged the Turkish government to "re-energise the reforms". The political uncertainty has delayed progress in Turkey's bid to join the EU.
While shunning a ban, the judges did cut half the AKP's treasury funding for this year, in the ruling on Wednesday.
A state prosecutor brought the case against the AKP, accusing it of trying to introduce Islamic Sharia law by stealth.
The AKP, which won a huge poll victory last year, denies it wants to create an Islamist state. It called the case an attack on democracy.
Commenting on the ruling, a spokeswoman for EU foreign policy chief Javier Solana said Turkey was "leaving a tense situation and we very much hope that the decision by the court will contribute to restore political stability".
The French junior minister in charge of European affairs, Jean-Pierre Jouyet, said the Turkish decision "comes as a relief". France is the current holder of the EU presidency.
Paris wants to "continue the negotiations with a view to opening two or even three chapters by the end of the year", he told the AFP news agency, referring to the areas covered in the detailed EU membership talks.
A ban on the AKP could have seriously damaged Turkey's negotiations to join the EU and affected the economy, the BBC's Sarah Rainsford reports from Ankara.
After the verdict, Turkish Prime Minister Recep Tayyip Erdogan said the whole country had been saved from a great injustice.
He described the trial as a waste of time and energy - and pledged his party would now press ahead with reforms - to modernise Turkey and ensure its EU membership and prosperity.
EU officials always stressed that political parties should only be voted out of power in elections, not banned by the courts.
However, court president Hasim Kilic said the financial sanctions imposed on the AKP were a "serious warning".
The court case followed a series of confrontations between the AKP, which has Islamist roots, and the secular elite. Turkish secularists have staged huge anti-AKP rallies.
The party's attempt to allow Islamic headscarves to be worn at universities was highly controversial. Last month the Constitutional Court overruled the move to lift the existing headscarf ban, saying it violated the secular constitution.