Turkey's Constitutional court has unexpectedly backed the government's plans to hold a referendum on reforms that would allow voters instead of parliament to elect future presidents.
The Court rejected appeals from both the main opposition party and Ahmet Necdet Sezer, the Turkish president, to quash the reforms on a legal technicality.
The decision paved the way for a referendum probably in October or November.
The ruling gives a boost to Tayyip Erdogan, the prime minister, and his centre-right AK Party as they campaign for re-election in July 22 parliamentary polls they are widely tipped to win.
Opinion polls show strong public support for the reforms, which the AK Party proposed after opposition parties in May blocked the election in parliament of its presidential candidate, Abdullah Gul, the current foreign minister.
"There will be a referendum," Hasim Kilic, deputy head of the Constitutional Court, told a news conference.
Asked whether this meant the Turkish people would be able to elect their president directly, Kilic said: "Undoubtedly."
But, assuming they do back the reforms, Turkish voters will probably not have a chance to elect their president directly until 2014, that is after Sezer's successor - due to be chosen by parliament this summer - has served a full seven-year term.
The row over the presidential election forced Erdogan to call the parliamentary election in July, months early.
Turkey's secular elite, which includes judges and army generals as well as Sezer and the main opposition parties, fears the AK Party would try to boost the role of religion, a claim the government strongly denies.
Most analysts had expected the Constitutional Court to uphold the opposition appeal and to rule the reforms invalid.