* Arinc says inquiry intended to tarnish government
* Five departmental police chiefs reassigned
* Prosecutor says conducting three investigations (Recasts with Arinc comments)
By Gulsen Solaker and Humeyra Pamuk
ANKARA, Dec 18 (Reuters) - Turkish Deputy Prime Minister Bulent Arinc said on Wednesday an anti-corruption crackdown months before elections was part of a plan to tarnish the government, highlighting an apparent power struggle shaking the ruling elite.
Scores of people, including three ministers' sons, prominent businessmen close to Prime Minister Tayyip Erdogan and local government officials, were detained on Tuesday in the biggest corruption investigation since Erdogan swept to power in 2002.
"Our opinion at the moment is that this is a planned operation, which has transformed into a psychological war, to tarnish our government," Arinc told a news conference, saying that a total of 52 people had been detained.
He did not say who might be behind such an effort, but said his comments were not aimed at the movement of powerful U.S.-based cleric Fethullah Gulen, whose followers are influential in the police and judiciary.
Tensions have grown in recent months between Erdogan's government and Gulen's Hizmet (Service) movement over plans to close private "Prep" schools, including those run by Hizmet. The schools, part of a network with global reach, are an important source of revenue and influence for Hizmet.
"It is incorrect to associate a meaning to my comments that would create a confrontation with the community," Arinc said, referring to Gulen's movement, whose adherents say they number in the millions.
Erdogan has dominated politics since he was first elected in 2002 and remains by far Turkey's most popular politician.
However, unprecedented protests erupted in the summer against what some critics see as his increasingly authoritarian style of government and the rift with Gulen poses another threat to his authority and to the reputation of his ruling AK Party.
Five senior police officers, including the heads of the financial crime, organised crime and smuggling units in Istanbul, were removed from their posts and swiftly replaced on Wednesday following the detentions on Tuesday, local media said.
In a brief statement the police said some staff had been reassigned, in some cases due to alleged misconduct and others "out of administrative necessity", but gave no further details.
"If this is an effort to obstruct the healthy enforcement of the investigation, of course it would not be right," Finance Minister Mehmet Simsek told reporters in Ankara, when asked about the issue, but said he could not confirm the changes.
The corruption investigation dominated newspaper headlines.
Pro-government papers accused Gulen's followers of running a smear campaign against the AK Party before local elections in March and a presidential race a few months later in which Erdogan is expected to run.
"The black propaganda escalates," the daily Star newspaper said on its front page. "Somebody has pushed the button on the eve of the municipality elections."
Erdogan assembled key advisers, including two deputy prime ministers and his interior and justice ministers, for an unscheduled meeting in Ankara, AK Party officials said, but they declined to say what was discussed.
The Istanbul prosecutor's office, which has been leading the corruption investigations, showed no sign of backing down.
In its first official comment since Tuesday's detentions, it said it was conducting three separate inquiries, two of which dated back to September 2012, and that two additional prosecutors had been appointed to assist.
HEART OF THE RULING PARTY
Erdogan and Gulen both draw support from religiously minded, conservative Turks, but there have long been ideological differences which have bubbled increasingly to the surface.
Erdogan has infuriated Gulen supporters with plans in recent weeks to abolish the private "Prep" schools.
Gulen could not challenge Erdogan at the polls and has shown no intention of forming a party, but their battle for influence could shape Turkish policy for years to come.
Many of Gulen's followers see him as a more progressive and pro-Western influence than Erdogan, whose opinions on issues from abortion to alcohol consumption and concentration of power around himself they view with increasing alarm.
"This does mark a battle for the heart and mind of the party, and for the likely policy orientation," said Timothy Ash, head of emerging markets research at Standard Bank.
Gulen runs a network of schools and other social facilities across the Middle East, Asia and Africa from a compound in the United States. He moved to the United States in 1999 after being charged with attempting to undermine the secular state.
He was later acquitted but has remained in Pennsylvania, an enigmatic figure who gives little hint of his intentions in Turkish politics. (Writing by Nick Tattersall; Editing by Alistair Lyon)