The European Union hailed the move on Wednesday after having warned Turkey that their detention could wreck Turkey's EU bid.
The four former members of parliament walked free after serving 10 years of a 15-year sentence for links to Kurdish rebel guerrillas.
They were mobbed by hundreds of ecstatic supporters singing, dancing, waving Kurdish flags and hurling flowers. Zana, small and bespectacled, was briefly knocked over in the melee.
"At this point, this country has entered a new era, it has turned a new page," she told a hastily assembled news conference. "My wish is for everyone to set aside their disputes and to solve our problems hand-in-hand."
The ruling, freeing them pending appeal, coincided with historic first Kurdish-language broadcasts on state television, and the start of an appeal at the European Court of Human Rights on the fate of jailed Kurdish rebel chief Abdullah Ocalan.
"Turkey's 80-year ban on the Kurds is over today," Sirri Sakik, another Kurdish former lawmaker, said outside Ankara's Ulucanlar prison before their release.
"Turkey's 80-year ban on the Kurds is over today"
EU Enlargement Commissioner Guenter Verheugen said in a statement: "Today's decision is a sign that the implementation of political reforms, which Turkey has been introducing in the
past two years, is gaining ground."
The Commission trusted the retrial would be fair and the verdict would reflect sound legal principles, he added.
Zana carries great symbolic importance both for supporters and those who see her as threatening Turkish unity.
For decades Turkey denied the very existence of its estimated 12 million Kurdish minority. Courts came down hard on expressions of Kurdish identity, especially after armed separatism broke out in 1984.
'Prisoner of conscience'
The EU sees Zana, Hatip Dicle, Selim Sadak and Orhan Dogan as prisoners of conscience. They were jailed in 1994 for ties to Kurdish guerrillas, a verdict upheld in April by another court in a retrial ordered by the European Court of Human Rights.
"Today's decision is a sign that the implementation of political reforms, which Turkey has been introducing in the
past two years, is gaining ground"
EU Enlargement Commissioner
"Their verdict has not been overturned. But taking into account their long imprisonment, a decision was made for their release pending the end of the investigation," a court official
told Reuters, adding that the retrial would start on 8 July.
Ankara is working flat-out on political and human rights reforms, hoping it will help win a firm start date for accession talks when EU leaders meet in December.
Foreign Minister Abdullah Gul said the reform drive had laid the foundations of a sound legal system, opening the way for the releases and capping the drive to fulfil EU political criteria.
"Honestly, I can tell you, with these changes we really achieved a critical mass," he told Reuters in an interview.
State security courts abolished
The government last month abolished the controversial state security courts under which the four were tried, and is working to set up new civilian structures to replace them.
Zana and the others were convicted at the height of a separatist conflict waged by Kurdish guerrillas seeking an ethnic homeland in south-eastern Turkey.
Violence has dropped off since the 1999 capture of Ocalan, although his armed Kurdish Workers Party (PKK) said last month it was calling off a five-year ceasefire.
Ocalan's lawyers and the Turkish government launched rival appeals in the European Court of Human Rights on Wednesday.
In a previous appeal a lower chamber of the Strasbourg court ruled his trial was unfair - a judgment that in principle would oblige Turkey to grant a retrial - but also rejected charges he had been held illegally and in inhumane conditions.