* Top judge says allegations against judiciary caused "trauma"
* Justice minister retaliates with sharp criticism
* Judiciary caught up in PM's power struggle with cleric (Adds justice minister)
By Gulsen Solaker
ANKARA, April 25 (Reuters) - In a defiant challenge to Turkey's prime minister, the head of the Constitutional Court complained on Friday of political criticism which he said had traumatised and divided the judiciary.
Hasim Kilic's uncompromising speech, made in the presence of a grim-looking Prime Minister Tayyip Erdogan, will exacerbate the tense relationship between the government and judiciary, creating a further headache for Erdogan as he weighs a run for the presidency.
Erdogan has said swathes of Turkey's lawyers and police are under the sway of his arch-foe, U.S.-based Muslim cleric Fethullah Gulen. He has clashed with judges over a series of rulings.
"To say that the Constitutional Court acts with a political agenda or to blame it for not being patriotic is shallow criticism," chief judge Kilic told a ceremony broadcast live on local TV channels.
"It is striking that a constitutional ruling has been criticised excessively with political worries," he said, in a reference to Erdogan's comment this month that he did not respect the court's lifting of a government-imposed ban on Twitter.
That ban was seen by Erdogan's critics as an attempt to halt a string of audio leaks purportedly revealing corruption in the government. Erdogan has branded the audio clips, which he says are "fabricated", as part of a campaign waged by Gulen and his followers in the judiciary to wreck the government.
Gulen, a former ally of Erdogan's ruling Islamist-rooted AK Party, denies these claims. Critics say the prime minister is destroying judicial independence and media freedoms in Turkey in a bid to cover up corruption in his inner circle. He rejects that accusation.
Justice Minister Bekir Bozdag struck back at the judge with an accusation that Kilic was acting like a political party and his speech had been heavy on polemics but light on legal ideas.
"The remarks made by the head of the constitutional court show that Turkey has a new opposition," Bozdag told reporters.
"Apparently the main opposition party and other opposition parties have failed...and our constitutional court head seems to be intent on filling this gap," he added.
Erdogan is yet to speak publicly about the judge's comments.
Kilic said Erdogan's allegations that parts of the judiciary formed an effective "parallel state" in Turkey were "very dire and serious".
"It is impossible for the judiciary to remain on its feet while it remains tarnished with this allegation," Kilic said, urging those behind the claims to provide evidence.
"The allegations caused a psychological trauma within judicial institutions," he said, adding that the claims had caused divisions among judges and prosecutors.
Erdogan, famed for his intolerance of criticism, abruptly left the ceremony after Kilic's speech, skipping a reception.
Kilic, who has headed the top court since 2007, has not been viewed in the past as at loggerheads with the government. In 2008, he voted against a bid to close the AK Party.
His court is frequently called upon to consider opposition challenges to legislation, and one case pending at the court is an opposition call for a re-run of a contested mayoral ballot in the capital Ankara. Government officials have said the court does not have the authority to rule on the election.
The Ankara vote last month was narrowly won by the AK Party but the main opposition CHP has said it was marred by fraud including problems with vote counting - charges that Turkey's High Election Board has already rejected.
Erdogan, who has dominated Turkish politics for more than a decade, also recently attacked another Constitutional Court ruling annulling some articles of a law that sought to increase government control of a key judicial body.
That law was among several measures, including legislation tightening control of the Internet, taken by the government to counter the graft scandal, which erupted when police detained sons of ministers and businessmen close to Erdogan on Dec. 17.
Thousands of police and judiciary members have been removed from their posts and access to social media sites blocked, in what is widely regarded as a backlash against the probe.
Erdogan remains Turkey's most popular politician after presiding over a decade of strong economic growth and his party trounced its rivals in March local elections, a result which has restored some calm to Turkish politics and financial markets.
Erdogan is keen to avoid renewed tensions ahead of his expected bid for Turkey's presidency in an August election, a move opponents fear could feed what they see as his authoritarian instincts.
Financial markets did not react to Kilic's comments on Friday.
Separately, Turkey's Capital Markets Board dismissed three of four deputy chairmen and 11 of 12 department heads on Friday in a move that one source linked to purges in other state institutions in the wake of the graft scandal.
(Additional reporting by Ozge Ozbilgin, Humeyra Pamuk and Ece Toksabay; Writing by Daren Butler; Editing by Mark Trevelyan)