Turkey's telecoms authority lifted a two-week-old ban on Twitter on Thursday, after the constitutional court ruled the block breached freedom of expression, an official in Prime Minister Tayyip Erdogan's office said.

Turkey's Official Gazette on Thursday published the constitutional court's ruling from Wednesday, further piling pressure on the telecoms authorities to lift the ban.

The Telecommunications Presidency (TIB) blocked access to Twitter on March 21 after Erdogan said he would "root out" the network following a series of anonymously posted audio tapes purporting to expose corruption in his inner circle days ahead of nationwide elections.

The U.S. State Department earlier called on Ankara to quickly lift the ban following the constitutional court's ruling.

"We think it [the ban] needs to end, and if there has been a court decision, we think it needs to be implemented quickly, as quickly as possible," Marie Harf, deputy spokesperson said, according to an official transcript of a press briefing on Wednesday.

"Obviously we don't think YouTube should be banned either."

Google's video-sharing website YouTube is still reportedly offline in Turkey, the TIB having blocked it one week after blocking Twitter. Legal challenges against the YouTube ban are pending.

Tweet surge

Erdogan's critics saw the ban as the latest in a series of authoritarian measures to crush a corruption scandal that had grown into one of the biggest challenges of his 11-year rule.

Tech-savvy Turks quickly found workarounds, with Internet analysts reporting a surge in tweets since the ban was imposed, but the issue has become a tug-of-war between Erdogan's administration and the San Francisco-based microblogging site, which has also challenged the move.

Erdogan and his Islamist-rooted AK Party emerged far ahead of rival parties in municipal elections on Sunday that had become a referendum on his rule.