Protesters demanding Turkish Prime Minister Tayyip Erdogan resign over a high-level corruption scandal clashed with riot police in Istanbul overnight while across the city thousands staged a rival show of support for the embattled leader. 

Around Taksim Square, centre of anti-government demonstrations last summer, police fired tear gas and used water cannon against protesters. 

Mr Erdogan faces a crisis unprecedented during his 11 years in office due to the scandal that has forced three ministers' resignations and a cabinet reshuffle but told supporters he will not step down. 

The scandal emerged after a police swoop detained dozens of people on 17 December including the sons of the interior minister and two other cabinet members in a corruption investigation. 

The inquiry was kept secret from police commanders who might have informed the government in advance.

The scandal risks destabilising the Turkish economy whose rapid growth has been a showpiece of Mr Erdogan's rule.

He still enjoys the loyalty of many pious Muslims and members of Turkey's wealthy elite.

While police tried to prevent anti-Erdogan crowds from forming on Taksim, cheering supporters of the ruling AK Party welcomed him at Istanbul airport 20 km away, waving party and national flags when he returned from a trip to the provinces.

"Sovereignty does not belong to the judiciary. Sovereignty does not belong to the government either. It belongs to the people," Mr Erdogan told the cheering crowds.

"The judiciary will pay for trying to take sovereignty out of the people's hands," he added.

Yesterday Mr Erdogan suffered a setback in his efforts to contain the fallout from the scandal when a court blocked a government attempt to force police to disclose investigations to their superiors.

The regulation that would have made police officers inform their superiors about investigations was announced by the government, angered at having been kept in the dark about the year-long corruption inquiry. 

The affair turned more personal this week when Turkish media published what appeared to be a preliminary summons for Bilal Erdogan - one of the premier's two sons - to testify, although its authenticity could not immediately be verified.

Denying wrongdoing, the Erdogan government purged about 70 of the police officers involved, including the head of the force in Istanbul while issuing the new rule on 21 December requiring police investigators to share their findings with their superiors.

AK controls two-thirds of parliament and pollsters see a modest blow to the party's base but say it could spiral if the scandal gets worse. 

One AK official, speaking to Reuters on condition of anonymity, predicted Mr Erdogan could bring forward the scheduled 2015 general election to arrest such a slide.