Twitter Inc bowed Wednesday to a Turkish government order to block access to allegations of government corruption, but stepped up a legal battle to overturn the order and restore access to Twitter service for its users in the country.

The San Francisco-based microblogging service said in a blog post Wednesday that it has filed court petitions to challenge a six-day-old Turkish government effort to block access to Twitter—as well as challenging an individual order to remove an account that has accused a former government minister of corruption.

But Twitter added that it has nevertheless blocked access to that account for users who indicate in their Twitter settings that they are located in Turkey, pending the outcome of its appeal.

“This order causes us concern. Political speech is among the most important speech,” the company said in its posting, adding that it had not turned over any user information, such as email addresses, to the authorities.

Under the handle oyyokhirsiza, the Twitter user in question had alleged corruption on the part of former Transportation Minister Binali Yildirim and his son, Erkam Yildirim, referring to the two as “thieves,” according to a court order that Twitter said it had provided to the site Chilling Effects.

Mr. Yildirim isn’t among the four Turkish ministers facing a prosecutorial investigation into allegations of corruption. After he was mentioned in one of the dozens of recordings leaked anonymously to social media alleging he had taken bribes, Mr. Yildirim denied the accusations in late January, calling them “claims without any address.”

“So some people apparently got disturbed by us…and want us blocked,” a tweet on the oyyokhirsiza account read on Wednesday afternoon, in an apparent response to the orders.

Twitter said it was using its Country Withheld Content tool to block the account. That tool replaces the pages for particular users or tweets with a message in that the content has been “withheld” in a particular country. The blocks can circumvented, however, by changing country settings within a user’s Twitter account, according to a person familiar with how the tool works.

A Wall Street Journal reporter in France, for instance, was able to view the “withheld”-content message on oyyokhirsiza’s account Wednesday by changing his settings to indicate he is in Turkey.

Twitter also said in its posting it has agreed to a Turkish prosecutor’s request to remove a number of tweets in order to protect “the safety of an individual.” According to adocument on Chilling Effects, that request said the tweets had made an individual the target of terrorist organizations. It was unclear if Twitter was also challenging those requests.

Twitter’s legal challenges came as a district court in Ankara on Wednesday imposed a stay on the implementation of the country’s blockage on the service, Turkey’s state news agency reported. The decision came after the court heard arguments from the Turkish Bar Association that the blanket ban on the popular social media site was disproportionate and illegal.

Asked about the decision, Turkey’s deputy prime minister said the government would abide by court rulings but didn’t specify when it would do so