Turkey's top court ruled on Thursday that a blanket ban on YouTube violated individual rights and freedoms, clearing the way for the popular video-sharing site to come back.
YouTube has been banned in Turkey since March 27 after the site was used to spread audio recordings where senior government, military and intelligence officials are allegedly heard weighing possible military action inside war-torn Syria.
The decision was in response to individual complaints to the constitutional court on the grounds of a breach of rights, an official from the prime minister's office told AFP.
Turkey's transportation ministry which is also in charge of communication services was due to be informed of the verdict, added the official.
The court's decision is "binding" and access to YouTube could be granted in the coming hours, the private NTV television channel reported.
Last month, the government said it would keep its block on YouTube in place despite two separate courts ordering the ban be lifted.
In March, Turkey also blocked Twitter after it was used to spread a spate of anonymous leaks implicating Prime Minister Recep Tayyip Erdogan and his inner circle in corruption allegations.
But the government had to comply with a constitutional court ruling that found the two-week ban on the microblogging site violated free speech.
The latest ruling is seen as another slight to Erdogan, who has accused the judiciary of "showing increasing appetite in the political sphere".
The constitutional court has provoked the wrath of the government, especially after overturning the Twitter ban and annulling parts of a ruling party-sponsored law tightening the grip of the executive over the judiciary.
Last month, the head of the constitutional court denounced Erdogan's "excessive criticism" of the judiciary, in a sign of the fallout from the huge corruption scandal that has put key state institutions at loggerheads with each other as the premier is tipped to run for president in August.
Erdogan has claimed Turkey's judiciary and police are under the sway of his ally-turned-rival Fethullah Gulen, an influential Muslim cleric based in the United States.
The ban on Twitter and YouTube was seen by Erdogan's critics as an attempt to prevent further details from the corruption scandal being leaked online as part of a campaign waged by Gulen and his loyalists to unseat his government.
Gulen is believed to have an extensive network of supporters in the police and the judiciary but denied claims that he has masterminded the corruption scandal against the prime minister and his allies.
The Internet bans ahead of March 30 local elections—in which Erdogan's ruling party scored a stunning victory—earned Turkey strong rebuke from rights groups deploring the curbs as a setback to freedom of expression in the country that hopes to join the European Union.
Explore further: Turkey keeps YouTube ban after court backtrack