ISTANBUL - Turkish Prime Minister Recep Tayyip Erdogan on Saturday lashed out at the judiciary as he tried to tamp down a corruption probe that has shaken his government and sparked a new wave of anti-government protests.

The conservative prime minister, who has dug in his heels over the crisis that has led to the resignation of three ministers, went again on the attack during a speech in the southern city of Manisa. "Whoever practises corruption will have us to deal with, but I have to say that there is a very serious smear campaign," Erdogan said.

The premier clearly targeted - without naming it - the Gulen movement, of ally-turned-enemy Fethullah Gulen, an influential Muslim cleric who lives in self-imposed exile in the United States, and who has loyalists in Turkey's judiciary, police force and political sphere. "There is a gang within the state that is about to become a criminal organisation. They do not know what privacy is. They do surveillance, they bug," Erdogan said.

"There are some members of the judiciary who, unfortunately, act in sympathy with certain criminal groups and side with some media outlets in order to smear innocent people by leaking confidential documents," the premier said. "In the same way, some of them are in the police department." The prime minister sought to portray the corruption probe as damaging to all of Turkey, not just to himself and his ruling Justice and Development Party (AKP). But recent attempts to bury the investigation have left him locked in a struggle with Turkey's courts. On Friday, Turkey's top court blocked an Erdogan decree that tried to limit the way police handled probes. Erdogan snapped at a Turkish prosecutor involved in the probe, Muammer Akkas, who had highlighted attempts to stall the inquiry through pressure.

"Who are you working for?" Erdogan asked. "You don't have the authority to affect the process regarding the government decree.... You have violated the constitution." Erdogan's administration also hit back at the European Union which on Friday urged Turkey to address corruption allegations in a "transparent and impartial manner". "I call on our European friends to refrain from prejudice when commenting on developments regarding Turkey's domestic affairs that have political dimensions and I invite them to be more cautious," said EU Affairs Minister Mevlut Cavusoglu.

But German Foreign Minister Frank-Walter Steinmeier commented that Ankara's handling of the affair "will serve as a test for every politician claiming to uphold the rule of law". Erdogan, who has led Turkey since 2002 as the head of a conservative Islamic-leaning government, is now seen as increasingly struggling to limit damage and hold on to power ahead of local polls in March. His unstated ambition to contest an August presidential ballot also looks compromised. On Friday, police forcibly dispersed thousands of anti-government demonstrators in the capital Ankara and commercial hub Istanbul, leaving at least two people injured. Protests also took place in eight other cities, local media reported.