Brazil's ex-President Lula calls corruption trial a 'farce'
Brazil's former President Luiz Inacio Lula da Silva has made a fiery defence against corruption charges he faces in a much-anticipated testimony.
In a five-hour closed session, Lula rejected allegations that he received a flat as a bribe in a scandal linked to the state oil company, Petrobras.
He called the case "illegitimate" and a "farce".
Lula faces a prison sentence if found guilty. If cleared, he says he will run again for the presidency next year.
The 71-year-old former president, still considered a hero to many in Brazil, was questioned by Judge Sergio Moro, who oversees the corruption investigation into Petrobras, known as Car Wash.
It was the first time that both faced each other in court, in the southern city of Curitiba, where security had been stepped up.
Wearing a sober suit and a tie striped with the colours of the Brazilian flag, Lula repeatedly denied the accusations against him.
"I consider this trial illegitimate and the accusation a farce," he said, according to a video released after the testimony.
He also strongly criticised the media for a coverage that, he claimed, "demonised" and "criminalised" him. The press, he added, wanted him "dead or alive".
But Judge Moro rejected this: "The press has no role in this case whatsoever," he said.
"The judgment will be made on the basis of law and exclusively according to the proof presented."
'Warrior of the Brazilian people': By Julia Carneiro, BBC News
Lula went from the courtroom to a campaign style rally where thousands of his supporters gathered, many wearing the red colour of his Worker's Party. He was cheered on as a "warrior of the Brazilian people" and defied his accusers.
He said they had produced no evidence against him - and that he wanted to be judged on proof, not on interpretations.
Excerpts of the hearing started being shown on TV immediately afterwards, with commentators trying to decide which side had prevailed.
But this call will only be clear in the coming weeks: Judge Moro is expected to hand down his verdict in 45 to 60 days.
This is the first of the five charges that Lula faces related to the Car Wash scandal, Brazil's biggest ever corruption investigation.
He is also accused of money laundering, influence peddling and obstruction of justice.
Meanwhile, a much smaller group of opponents of the former president also gathered, raising an inflatable caricature of Lula dressed in prison garb.