Leopoldo Lopez arrested
Venezuelan opposition leader Leopoldo Lopez handed himself over to police in Caracas Reuters

A Venezuelan opposition leader has been arrested by police as pro- and anti-government protesters staged rival demonstrations in Caracas.

Leopoldo Lopez, a vocal critic of President Nicolas Maduro, reportedly handed himself over to the National Guard after addressing 5,000 supporters with a megaphone.

"If they put me in prison, it'll wake up the people. That's worthwhile," he said, according to USA Today. "I'm never going to leave this country."

He then walked towards police patrolling the demonstration and turned himself in.

Lopez was wanted by authorities on charges ranging from murder to vandalism of public property in connection with demonstrations that turned violent last week. He denied all allegations.

Just a mile away thousands of people rallied in support of Maduro's socialist government.

Three people, two anti-government protesters and one government supporter, were shot dead when rival protesters and police clashed in Caracas last Wednesday.

Lopez, the head of the Popular Will opposition party had been in hiding for days.

"I haven't committed any crime," Lopez said. "If there is a decision to legally throw me in jail I'll submit myself to this persecution."

Lopez has been leading anti-government protests against a shortage of basic goods, high inflation and rampant crime.

Maduro claimed that the protests had been fomented by the US as part of an attempted coup.

Three US embassy officials were given 48 hours to leave the country on the grounds that they were alleged to be helping protesters.

The US State Department described the allegations as "baseless and false".

The US was accused of involvement in a botched coup against Maduro's predecessor and mentor Hugo Chavez in 2002.