Venezuelan security forces have arrested Leopoldo Lopez, an anti-government protest leader, on charges of fomenting unrest that has killed at least four people.

On Tuesday tens of thousands of protesters stood in the way of the vehicle carrying Lopez, a 42-year-old Harvard-educated economist, after he made a defiant speech, bid farewell to his family, and gave himself up to soldiers. The vehicle eventually reached a military base.

Opposition leaders hope Lopez's arrest will galvanise street demonstrations against President Nicolas Maduro, though there is no immediate sign the protests will remove him.

The threat of more violence hung over Tuesday's demonstration as Maduro, 51, led a rival march to denounce what he calls a "fascist" plot to overthrow him.

But Lopez's repeated appeals for restraint, a strong police presence and heavy rain appeared to calm emotions and there were no reports of major violence.

"I am handing myself over to an unfair justice system," Lopez told supporters, standing on a platform next to a statue of Cuban poet and independence hero Jose Marti. "May my imprisonment serve to wake the people up."

Final embrace

The crowd lifted Lopez's wife up to give him a final embrace and hang a crucifix around his neck.

Minutes later, he surrendered to military officers, pumping his fist and then stepping into the military vehicle with a Venezuelan flag in one hand and a white flower in the other. Supporters gathered at the La Carlota airbase where he was taken, but later dispersed.

Lopez was wanted by the police on charges of fomenting unrest that has left at least four people dead in Venezuela [AFP]

Elsewhere in Caracas, thousands of oil workers and Maduro supporters, clad in the red of the ruling Socialist Party, held their own demonstration.

In his speech, Maduro said he had sent Diosdado Cabello, vice president of the Socialist Party, to help transport Lopez.

Lopez's Popular Will party said he had been taken to court where authorities would formally read him the charges, which include murder and terrorism. Lopez says he is being made a scapegoat by a dictatorial government.

Earlier, in the coastal town of Carupano in eastern Venezuela, residents said a 17-year-old student died after being struck by a car during an anti-government demonstration.

That added to three fatal shootings in Caracas last Wednesday.

Student-led protests across the nation of 29 million people have become the biggest challenge to Maduro since his election last year following socialist leader Hugo Chavez's death.

They demand Maduro's resignation over issues, ranging from inflation and violent crime to corruption and product shortages.

Diplomats' expulsion

The rival rallies came the day after Maduro's government gave three US embassy officials 48 hours to leave the country, claiming they were supporting opposition plots to topple his 10-month-old administration.

In Washington, the US State Department on Tuesday said allegations that the US is helping to organise protests are "baseless and false" and said it was evaluating what retaliatory action to take for the diplomats' expulsion. Maduro has expelled American diplomats on two previous occasions.

"We've seen many times that the Venezuelan government tries to distract from its own actions by blaming the US," Jay Carney, White House spokesman, said.

He said the Obama administration was "alarmed" by displays of violence by security forces and pro-government militias at recent demonstrations. There has been no evidence Venezuela's military might turn against Maduro.

The unrest has not affected the country's oil industry, which is struggling from underinvestment and operational problems that have left output stagnant for nearly a decade.

Chavez purged state oil company PDVSA of its dissident leadership in 2003 after a two-month industry shutdown meant to force him to resign, making it unlikely workers could attempt something similar against Maduro.