Turkish police have raided media outlets linked to a US-based Muslim cleric and detained at least 23 people, including journalists and television producers, in a nationwide operation.

Though a former ally, the cleric Fethullah Gulen has been in an open conflict with Turkish President Tayyip Erdogan since a graft investigation targeting the president's inner circle emerged a year ago.

The offices of the country's best-selling Zaman newspaper and Samanyolu television were raided on Sunday, marking an escalation in Erdogan's battle with Gulen.

The Anatolia news agency says a court issued a warrant to arrest 31 people and that 23 of them were detained in raids in Istanbul and other cities across Turkey on Sunday.

Among those detained were Ekrem Dumanli, the editor-in-chief of Zaman, and Hikmet Karaca, the head of Samanyolu TV, and senior police officers.

"History will remember the good people who walked without looking back for a more democratic Turkey," Dumanli told reporters at the newsaper's headquarters in Istanbul, before his detention.

"This is not about [Gulen] movement-government rivalry. Please, we should protect our democracy," he added.

Erdogan accuses Gulen's movement of orchestrating an alleged plot to try and bring down his government. The government says his followers were behind corruption allegations that last year forced four cabinet ministers to resign.

Gulen, who lives in self-imposed exile in Pennsylvania, denies the accusations.

Zaman and Samanyolu are affiliated with Gulen's movement.

Dozens of people gathered outside Zaman's headquarters in Istanbul to protest the detentions, shouting: "Free press cannot be silenced." Turkey's journalism associations also denounced the raids targeting journalists.

It was the latest in a wave of arrests targeting Gulen's group. Several police officers were arrested earlier this year for alleged illegal wiretaps and other charges.

The government has said it wants Gulen extradited to Turkey from the United States.