Although PM Erdogan knew about the demonstrators, it did not stop him from going to the mosque. "Those who stir up the religious differences of our nation, those who want to sow division in our soil by making discriminatory propaganda, should know their efforts are futile," he later told reporters. "Those who try to spoil Turkey's legal, secular and social make-up are doomed to melt."
A small Hizb ut-Tahrir demonstration in Istanbul, on Friday ended without incident or arrests.
Leaders of the group were arrested by police in Istanbul after around 1000 people demonstrated after Friday prayers in Istanbul. Protesters at the rally carried placards reading: "Either the Caliphate or martyrdom", referring to the party's aim of through choosing a caliph or leader to implement Islamic law.
Caliphate was abolished by Turkey's secular founder Mustafa Kemal Ataturk.
The UK said that it would also ban the group after the July 7 bombings.
Uzbekistan blamed London-based Hizb ut-Tahrir for violence in its eastern city of Andizhan in May when troops fired on protesters and killed at least 160 people.