ISTANBUL — It is a sign of the difficulty of banning Twitter in the age of Twitter that within hours of the Turkish government’s attempt to block the social media site, President Abdullah Gul was one of thousands of Turks who protested the ban — using Twitter.

“Shutting down social media platforms cannot be approved,” Mr. Gul posted on Twitter on Friday, adding that “it is not technically possible to fully block access to globally active platforms like Twitter, anyway.”

While Turkey, a predominantly Muslim country of 79 million people, has long sought to portray itself as a model of democracy in a restive region, critics both inside and outside the country denounced the government’s ban as a “digital coup” more befitting China or North Korea. They, too, of course, did so over Twitter.

Echoing outrage from across the world, Neelie Kroes, vice president of the European Commission, the European Union’s executive body, wrote on Twitter that “The Twitter ban in #Turkey is groundless, pointless, cowardly. Turkish people and intl community will see this as censorship. It is.”