The Supreme Court also announced that the opposition mayor of San Diego, Enzo Scarano, would be removed from his post and serve more than 10 months in prison for disobeying a court order to keep protesters from barricading streets in the city.
The mayors joined opposition leader Leopoldo Lopez, who is being held on charges of arson and conspiracy, as leading government opponents detained by President Nicolas Maduro's administration since the unrest began last month.
The arrest of San Cristobal mayor Daniel Ceballos was made in Caracas hotel by agents from the Bolivarian National Intelligence Service, known by its Spanish initials SEBIN, according to his aide, Ronni Pavolini.
Mr Ceballos, who was in Caracas for a meeting of opposition mayors, had been outspoken in his criticism of what he called repression by security forces in his city.
Interior and justice minister Miguel Rodriguez Torres confirmed the arrest later on state television. "This is an act of justice for a mayor who not only did not meet his obligations as required by law and the constitution, but also facilitated and supported all the irrational violence in San Cristobal."
The protests that have shaken Venezuela for more than a month began in early February with students in San Cristobal. Since then it has seen intense clashes between authorities and protesters frustrated by soaring inflation, rampant violent crime and shortages of basic food items.