Venezuelan opposition leader Leopoldo Lopez has gone on trial on charges of inciting violence during anti-government protests that ultimately left 43 people dead.

Lopez, who says the charges are politically motivated, was transferred before dawn on Wednesday from his military prison on the outskirts of Caracas to a court in the centre of the capital to stand trial alongside four students.

Lopez was one of the main leaders of protests against President Nicolas Maduro's government that erupted in February and raged for four months, focusing Venezuelans' anger over rampant crime, runaway inflation and shortages of basic goods.

Prosecutors accuse Lopez, the leader of the Popular Will party and a former presidential candidate, of arson, damaging property and inciting violence, the AFP news agency reported.

He publicly handed himself in to the authorities on February 12 during a protest that turned violent and ended with three deaths, the first of the 43 people killed during months of demonstrations that followed.

The 43-year-old Harvard-educated economist denies the accusations against him and calls himself a "prisoner of conscience".

The case has been condemned by the opposition and the International Commission of Jurists, which last month accused Venezuela's judiciary of cracking down on students and dissidents.

'We can't abandon him'

More than 200 supporters were gathered outside the court on Wednesday carrying signs with messages such as "Free Leopoldo".

Lopez's lawyers, who had vowed to boycott the trial, ultimately turned up to represent him, but said the case was still plagued by irregularities.

"Leopoldo has taken on the justice system, stood up for the Venezuelan people," defence lawyer Juan Carlos Gutierrez told journalists.

"He didn't abandon the country, he didn't flee, and if he didn't, we can't abandon him either."

The defence team says the trial will likely take two to three months.

Lopez faces up to 10 years in prison if found guilty.

A prominent opposition ally, Maria Corina Machado, said she had been refused entry to the trial and accused the government of violating the independence of the judiciary.

"The entire justice system has dedicated itself to persecuting those who think differently, while the criminal underworld continues business as usual," she told journalists.

Source: Agencies