* Premier urged to resign too in spiralling crisis
* Graft inquiry pits government against judiciary
* Fresh demonstrations in biggest Turkish cities
By Dan Williams
ANKARA, Dec 25 (Reuters) - Three Turkish cabinet members resigned over a spiralling corruption scandal on Wednesday and one of them urged a defiant Prime Minister Tayyip Erdogan to follow suit.
That challenge, unprecedented in Erdogan's 11 years in power, raised the temperature in the week-old crisis which has pitted the prime minister against the judiciary and reignited anti-government sentiment simmering since mass street-protests swept Istanbul and other cities in the summer.
The resigning interior, economy and environment ministers each had a son detained on Dec. 17 as police went public with a long-running investigation into graft allegations involving state-run lender Halkbank. Two of the sons remain in custody along with 22 others, including the head of the bank.
The first two ministers echoed Erdogan in depicting the inquiry as baseless and a conspiracy. But Environment Minister Erdogan Bayraktar turned against the Turkish leader.
"For the sake of the wellbeing of this nation and country, I believe the prime minister should resign," he told NTV news.
By breaking ranks, Bayraktar may have diluted any easing of pressure on Erdogan afforded by the ministers' resignations, although some commentators thought their timing was off anyway.
"These are very late and difficult resignations. They don't have any value in terms of democracy," said Koray Caliskan, an associate professor at Istanbul's Bogazici University.
Sources in Erdogan's office said he might replace as many as nine ministers, including the three who quit, as several cabinet members plan mayoral runs in local elections in March.
Late on Wednesday, Erdogan gave new cabinet names to President Abdullah Gul for approval, the sources said, without identifying them or their portfolios.
The timing of the shake-up, on Christmas Day, cushioned the blow to Turkey on dormant international markets. But the stock index closed 4.2 percent and the lira weakened to 2.0862 against the dollar.
During his three terms in office, Erdogan has transformed Turkey by tackling its once-dominant secular military and overseen rapid economic expansion. He appeared unfazed by the resignations and the gauntlet thrown down by Bayraktar, which set off fresh demonstrations in Ankara, Istanbul and Izmir.
In a speech, Erdogan said he would not tolerate corruption. But, having responded to the Dec. 17 graft arrests by sacking or reassigning around 70 of the police officers involved, he argued that their work had been deeply tainted.
"If a verdict is made by the opposition party on the second day of the investigation, what's the point of having judges? If a decision is made by the media, what's the point of having these long legal procedures?" Erdogan told provincial leaders of his Islamist-rooted AK party.
Alluding to TV news reports which have riveted Turks with footage of cash-filled shoeboxes allegedly seized at suspects' homes, he asked: "How do you know what that money is for?"
The 14-month investigation was conducted largely in secret. At the weekend, the government changed regulations for the police, requiring officers to report evidence, investigations, arrests and complaints to commanding officers and prosecutors. Journalists have also been banned from police stations.
Hurriyet newspaper said up to 550 police officers, including senior commanders, had been dismissed nationwide in the past week by Interior Minister Muammer Guler, who has now resigned.
Erdogan's critics see an authoritarian streak in his rule. The European Union, to which Turkey has long sought accession, on Tuesday urged Ankara to safeguard the separation of powers.
"The only way you can explain an interior minister removing the police chiefs working in an investigation regarding his own family is that the aim is to obstruct evidence," said Prof. Caliskan, who writes for the centrist newspaper Radikal.
"The prime minister thinks Turkish people are not very clever (but) he will be slapped hard at the ballot box."
Turkey's next parliamentary election is not until 2015. But with the local ballots looming, pollsters say the scandal's so-far modest erosion of AK's popular support could quicken.
In a fourth resignation on Wednesday, AK lawmaker Idris Naim Sahin, a former interior minister, told the party he was also stepping down, according to sources in his office.
The scandal has laid bare rivalry between Erdogan and Fethullah Gulen, a U.S.-based Turkish cleric whose Hizmet ("Service") movement claims at least a million followers, including senior police officers and judges, and which runs schools and charities across Turkey and abroad.
While denying any role in the affair, Gulen described Erdogan as suffering "decayed thinking" after the premier portrayed himself as fending off a shadowy international plot.
In an apparent reference to Gulen, Erdogan said on Wednesday: "We would not allow certain organisations acting under the guise of religion but being used as the tools of certain countries to carry out an operation on our country."