Leopoldo López faces 10 years in prison after organising rally that has led to week of violent protests about state of economy

Violent protests in Venezuela continued overnight as a court ordered the detention of an opposition leader blamed for triggering a week of turmoil.

A judge ruled early on Thursday that there was enough evidence to hold Leopoldo López, who surrendered to authorities before thousands of cheering supporters this week, on charges that include arson and criminal incitement stemming from a huge rally on 12 February.

Prosecutors decided not to pursue more serious charges, including murder and terrorism, when López made a court appearance at a military base outside the Venezuelan capital, Caracas, after a night in which violence flared across much of the country. The 42-year-old politician could face at least 10 years in prison.

His wife, Lilian Tintori, urged his followers to continue the protests as she confirmed he would remain in jail. "Change is within us all," she tweeted. "Don't give up. I will not."

In the hours before the decision, President Nicolás Maduro had suggested that López would remain in custody and face criminal charges. The government has accused the former mayor and the leader of the Popular Will party of attempting to foment a coup.

"I said send him to jail, and that's what happened, and that's what will happen with all of the fascists," Maduro said in a two-hour speech broadcast nationally. "I won't allow him to challenge the people of Venezuela, the constitution."

As the waiting dragged into the night, anti-government protesters in Caracas and other cities set fire to rubbish in the streets and threw rocks at national guard troops, who fired teargas, water cannon and rubber bullets. Gunfire was heard in downtown Caracas while Maduro was on television. There were no immediate reports of new casualties.

Demonstrators are protesting López's detention as well as the rampant crime, shortages of consumer goods and inflation rate of more than 50% that has made life difficult for many in the country.

The president said he would take harsh measures in Tachira, an opposition stronghold near the border with Colombia where there have been fierce clashes between security forces and protesters. Maduro said he was prepared to declare a "state of exception", a form of martial law.

"If I have to decree a state of exception for Tachira and send in the tanks, I am ready to do it," he warned.