Baltasar Garzon, the Spanish judge who famously indicted late Chilean leader Augusto Pinochet, has found himself in the dock for the first time.
He went on trial at the supreme court in Madrid charged with illegally authorising police to bug the conversations of lawyers with clients.
He denied wrongdoing and said he had always sought to protect detainees' right to a fair defence.
It is the first of three private prosecutions Judge Garzon is facing.
Suspended from Spain's National Court in 2010, he could see an end to his career if convicted.
Dressed in his own judge's robes, Mr Garzon, 56, sat next to his lawyer in court.
Judge Garzon's supporters say he is being unfairly targeted by people who resent his work on human rights over the past two decades.
In a second case opening on 24 January, he is charged with exceeding his powers by ordering an investigation into the disappearance of tens of thousands of people during the 1936-39 Spanish Civil War and under Franco's dictatorship.
No date has yet been set for his third trial, where he is accused of taking bribes over payments he allegedly received for bank-sponsored seminars in New York.
If convicted in his first trial, Judge Garzon would not go to prison but could be suspended from the legal profession for 17 years.
Arriving at the court, he smiled as he was applauded by a small crowd of supporters who were held back behind a police line.
The judge was accused of overstepping his authority by ordering the recording of prison conversations between three defendants and their lawyers.
He sat quietly with his lawyer, reading papers and taking notes, as a seven-judge panel heard a clerk read out the charges and background to the case.
Spanish law allows the bugging of prison conversations involving terrorism suspects but is vaguer on non-terrorism cases.
It does allow for bugging if the investigating judge believes the conversations will yield evidence relevant to an investigation.
"Obviously, the interpretation that I make is that wiretaps can be authorised with a court order, and not just in cases of terrorism,'' Judge Garzon testified.
One of the signs held by the protesters outside the court read: "They are covering up their crimes by going after Garzon."
Gaspar Llamazares, an MP for the United Left party, told AFP news agency that Mr Garzon was being persecuted for this work to expose the crimes of the Franco era.
"We are faced with an act that shames Spanish democracy, justice and the supreme court itself judging an innocent person for trying to judge Francoism and also for trying to fight corruption," he said.
"I think the damage is done and the sentence is pre-determined."
Another protester, 68-year-old Angel Fernandez, said: "I don't know the law, but I can see there is an injustice.
"I can see there is absolute corruption and that they are not judging those who should be judged."