The clashes on Thursday came as the two judges were hauled before a disciplinary board for accusing the judiciary of helping to fix elections.
The hearing, which lasted an hour on Thursday, was adjourned until May 11, but reformist activists condemned the police crackdown, charging that President Hosni Mubarak's government was once more employing strong-arm tactics.
Thousands of police were deployed across Cairo on Thursday before the hearing by the disciplinary board against Mahmud Mekki and Hisham al-Bastawissi, two of the most outspoken reformists in the judges' syndicate.
A group of a few hundred activists camping outside the court to support the two judges were assaulted by police.
Some of them were beaten with sticks and an undetermined number was arrested.
"Judges are our voice against dictatorship," chanted the protesters. "Police are oppressing us" and "With God's help, the judges do not fear anybody", were some of the slogans.
Egyptian film director Yousif
Chahine (C) joined the rally
Many rights groups and intellectuals have given support to the two judges, who had accused pro-government judges of helping to fix the November-December parliamentary polls that saw Mubarak's ruling party retain power.
Egypt's judges, who are responsible for supervising the polling process, have become a symbol of the drive for reform in Egypt and are waging an aggressive campaign to demand more independence from the executive.
Activists reacted angrily to Thursday's crackdown by the police.
Mohammed Sayed Said, who was among the judges' supporters, which also included filmmaker Yousif Chahine, said: "This display of force is a return to the policies of oppression and to a police state.
"But all this will not succeed in reimposing a culture of fear. The people have already defeated it and they are ready to pay with their blood for democratic change," he said.
US-based Human Rights Watch urged the Egyptian government on Wednesday to investigate the fraud that marred the poll and stop intimidating the judges who reported it.
Joe Stork, deputy director of the group's Middle East and North Africa programme, said: "The government is punishing judges just for doing their job.
"It should be investigating the widespread evidence of voter intimidation, not shooting the messengers who reported the fraud."
The two judges have been prominent in a campaign by the informal Judges Club to obtain full financial and administrative independence from the ministry of justice.
Judges say the ministry has used its control of salaries, bonuses and disciplinary proceedings to influence judges.
Egyptian police clash with
protesters in Cairo
The confrontation between the government and independent judges has been brewing since last year, when the judges tried to win independence by threatening to refuse to supervise presidential and parliamentary elections, as the law requires.
They later backed down, but after the elections judges released reports alleging widespread abuses and in some cases outright fraud in the counting. Several of them spoke openly on Arabic satellite channels watched by many Egyptians.
The judges have the support of the Muslim Brotherhood, the country's largest opposition group, as well as most opposition parties and human rights groups.