* President criticises centre-right for courthouse protest
* Berlusconi attacks "communist" centre-left
* Centre-left meet 5-Star movement on parliament posts (Adds comments by Napolitano, Berlusconi, PD, 5-Star Movement)
By Gavin Jones
ROME, March 12 (Reuters) - Italian President Giorgio Napolitano on Tuesday stepped into the political and legal battle surrounding Silvio Berlusconi, criticising the former prime minister's party for a protest outside the Milan court where he is being tried.
Dozens of lawmakers from Berlusconi's People of Freedom party (PDL) demonstrated on Monday outside and inside the courthouse where Berlusconi is fighting charges of paying for sex with an under-age prostitute.
In an unusually strong statement issued after meeting PDL leaders, Napolitano expressed "strong regret" over "a political protest without precedent inside the Palace of Justice of Milan" and "the re-emergence of tensions and clashes between politicians and the justice system".
He met later on Tuesday with the ruling body of Italian magistrates whose members have protested repeatedly about Berlusconi's attacks on prosecutors and judges, whom he calls a "cancer of democracy".
After that meeting Napolitano issued another unusually direct statement which is sure to anger the centre-right in which he called "an absurd hypothesis" Berlusconi's frequent claim that he is the victim of politically motivated judges.
Beppe Grillo, the leader of the anti-establishment 5-Star Movement which holds the balance of power in parliament, joined the controversy on Tuesday, posting a comment on his blog expressing his "full solidarity with the Milan judges".
The 76-year-old media billionaire faces a spate of trials this month as he fights for his political future following an inconclusive national election in February.
Berlusconi performed better than expected in the election, which produced a hung parliament, but still risks having no say in the formation of a government.
Both the centre-left Democratic Party (PD), which won most seats, and Grillo's 5-Star Movement, say they will not form a government with him.
On Tuesday, Berlusconi accused the PD of trying to take all the key positions of power which must be elected after the new parliament convenes on Friday, particularly the speakers of the two chambers and a new state president to replace Napolitano.
He said the PD's strategy "shows yet again its old roots, buried in an ideology (communism) that it has never denounced."
Talks over forming a government have not been launched, with Grillo constantly rebutting calls from the PD to work together, but Napolitano will try to broker an agreement when he begins formal consultations with party chiefs next week.
On Tuesday PD officials held a first meeting with the 5-Star movement to discuss parliamentary appointments.
The PD's envoy, Senator Luigi Zanda, said the meeting had gone well and the two parties would try to find mutually acceptable candidates. 5-Star posted on Grillo's blog that it wanted one of its own elected as lower house speaker.
Berlusconi has not been present at recent hearings in the sex trial and in an appeal against a conviction for tax fraud because he is in hospital with an eye problem which prosecutors suspect is a delaying tactic.
His doctors said on Tuesday he would spend a fifth consecutive night in the private clinic in Milan. (Editing by Michael Roddy)