Turkey's Prime Minister Recep Tayyip Erdogan cracked down on Twitter after his administration suffered major embarrassment ahead of Turkey's March 30 elections.Getty Imagesa

ISTANBUL — Turkish authorities were moving to block access to YouTube on Thursday following similar action against Twitter, the country’s state-run news agency said.

While the Anadolu Agency said the national telecommunications authorities had instituted the block, the website was still widely accessible following the announcement. The block against YouTube is likely to provoke further outrage in Turkey, where social media is widely used.

Key allies, including the U.S. and the European Union, had criticized the earlier move against Twitter as a restriction of free speech and a step backward for Turkish democracy. That ban came shortly after Prime Minister Recep Tayyip Erdogan threatened to “rip out the roots” of Twitter, which has been a conduit for links to recordings suggesting government corruption. Turkey holds crucial local elections Sunday, widely regarded as a referendum on Erdogan’s rule.

A telecommunications authority webpage gave the following information for YouTube.com: “After technical analysis and legal consideration based on the law, an administrative measure has been taken for this website.”

The ban comes after an alleged audio recording of a meeting between the Turkey’s foreign minister, intelligence chief and top military and Foreign Ministry officials was leaked on YouTube. The four are allegedly heard discussing a military intervention in Syria, a sensitive political issue in Turkey. Though the context of the conversation is not clear.

A government official said access to the website was closed down out of “national security concerns and because of the urgency of the situation.” The official said the move aimed to prevent the “posting of other recordings that may threaten national security.” The official spoke on condition of anonymity because of government rules that bar civil servants from speaking to journalists without prior authorization.

Erdogan railed against the leak of the audio recording during a campaign rally, saying: “this is immoral, this is sleaze, this is shameful, this is dishonorable.”

Foreign Minister Ahmet Davutoglu called the leak an act of espionage and an “open declaration of war against the Turkish republic.”

His office released a statement saying eavesdropping on a top-secret meeting was an attack on Turkey’s security and a grave crime. It said those responsible for the leak would be severely punished.

In an emailed statement from Google Inc., which owns YouTube, spokeswoman Abbi Tatton said the company had seen reports that some users in Turkey weren’t able to access YouTube.

“There is no technical issue on our side and we’re looking into the situation,” she said.

Shortly after Thursday’s announcement, European Commission Vice President Neelie Kroes in a tweet called the block against YouTube “another desperate and depressing move in Turkey.”

“I express my support for all those supporters of real freedom and democracy,” she said. “We in Europe stand for an open Internet and free expression on it.”

The attempted crackdown on Twitter came after links to other wiretapped recordings suggesting corruption were spread on the microblogging site, causing Erdogan’s government major embarrassment before Sunday’s local elections.

Erdogan has confirmed that he personally ordered the block on Twitter, alleging that the company wasn’t following Turkish laws. Despite the block, many Turkish users have found ways to access Twitter.

Erdogan has blamed a movement led by U.S.-based moderate Islamic cleric Fethullah Gulen, a former political ally of Erdogan. Also on Thursday, a television station linked to Gulen said that Turkish authorities have withdrawn its license to broadcast nationally.