A Turkish court ruled on Wednesday that the government could not ban Twitter and ordered the Turkish Telecommunications Authority to stop blocking the service. But it is still not clear if or when Twitter will be restored in the country.

Turkey’s telecoms authority (TIB) blocked access to Twitter on March 20, hours hours after  Prime Minister Recep Tayyip Erdogan railed against the social media platform at a campaign rally in the leadup to key municipal elections on March 30. The electoral campaign sees the Turkish premier fighting a corruption scandal during which several anonymous postings on Twitter purportedly revealed government wrongdoing.

A phone recording that was being tweeted is alleged to be of Erdogan telling his son to remove large sums of cash from his home on the day in December of last year when the homes of three former ministers’ sons were raided in a corruption investigation. Erdogan has repeatedly insisted that the recording is a fake.

Turkey’s Bar Association had immediately challenged the Twitter ban saying it was against local freedom of information laws. An Ankara court has now ruled in its favor and ordered TIB to restore regular Twitter access. But legal experts say the telecoms authority may not have to comply immediately and can appeal the court’s decision.

The Twitter ban has sparked major outrage in Turkey and around the world, with the U.S. State Department comparing it to “21st Century book burning”.

Until the block six days ago Turkey was one of the world’s top 10 Twitter-using countries and service there is still partly active.

The Turkish Twitter ban has been widely bypassed, including by the country’s president who opposes the ban, by either using virtual private network (VPN) software or by changing their Domain Name System (DNS) setting.