Turkey's highest court has ruled that the government's block on online messaging service Twitter violates freedom of expression and individual rights.

The verdict is the most significant legal challenge yet to a ban which caused public uproar and international condemnation.

The top constitutional court ordered that the ban must be lifted, sending a statement both to the country's telecommunications authority TIB and the communications ministry to "do what's necessary," the private NTV television reported.

Although the ruling was binding, it was still unclear whether the government would overturn its decision.

Turkey's telecoms authority (TIB) blocked access to Twitter on March 21 after Prime Minister  Recep Tayyip Erdogan said he would "root out" the network, following a stream of anonymously posted audio tapes purporting to expose corruption in his inner circle days ahead of nationwide elections.

Erdogan's decision sparked condemnation at home and abroad and earned Turkey strong rebuke from rights groups and its Western allies, but Twitter users continued to circumvent the ban through text message or adjusting their internet settings. 

Erdogan's Islamic-rooted Justice and Development Party (AKP) won local polls, a win that came despite the corruption claims and internet clampdowns.

The government also shut down YouTube after the popular social media network leaked a high-level security meeting discussing war plans against neighbouring Syria.

Source: Agencies