ISTANBUL (AP) -- A Turkish journalist critical of the government has been arrested in Istanbul.

Istanbul Chief Public Prosecutor Hadi Salihoglu said Saturday that Mehmet Baransu, who writes for the Taraf newspaper, was arrested overnight for defamation and "indicating counterterrorism officials as targets."

Salihoglu said Baransu resisted arrest.

The journalist tweeted he was beaten by police and believes he was detained as "revenge" for criticizing Salihoglu. He was released after questioning Saturday afternoon.

Baransu has publicly criticized a government crackdown on Turkey's police and judiciary for a wiretapping scandal that the government says is directed by people trying to orchestrate a coup. Critics say the crackdown aims to silence those who brought corruption charges against government officials, including Prime Minister Recep Tayyip Erdogan.

Erdogan is the front-runner in Turkey's presidential election on Sunday.