IT WAS a military-style operation, of the kind you would mount to collar a dangerous drug lord. On the afternoon of February 19th dozens of agents of Venezuela’s state security service, Sebin, armed with automatic weapons and a sledgehammer (but no arrest warrant) burst into a suite of offices on the sixth floor of a tower block in El Rosal, a normally quiet district of Caracas. Their quarry was not some villain but the 59-year-old mayor of metropolitan Caracas, Antonio Ledezma. After a day and a half in Sebin’s custody he was sent to a military jail to await trial on charges of conspiring to overthrow the government of Nicolás Maduro, Venezuela’s president.

This is not the first time the left-wing regime has locked up a prominent member of the opposition. Among Mr Ledezma’s fellow inmates is Leopoldo López, who spent much of last year in solitary confinement on similar charges. The arrest of an elected mayor (though one whose powers had been much reduced by the government) marks a clear escalation in the regime’s campaign of repression.

The provocation was the publication of a one-page advertisement in an independent newspaper, written by Mr Ledezma, Mr López and María Corina Machado, another confrontational opposition leader, calling for the establishment of a broad-based transitional government (and, by implication, for Mr Maduro’s resignation). That, said the president, was the prelude to an attempted coup, the latest of a dozen such plots that he imagines have been hatched against him. The government has also linked Julio Borges, a moderate who leads the biggest opposition party, Justice First, to the alleged coup plot. It is moving to expel him from parliament.

The real reason for the crackdown is probably the president’s mounting fear that he could soon be ousted from power legally. He was elected by a slim margin in April 2013, after his predecessor and mentor, Hugo Chávez, died of cancer. Since then, conditions in Venezuela have worsened dramatically. The government’s ruinous policies have led to shortages of food and medical supplies, long queues at shops and soaring inflation. The collapse in the price of oil, virtually the only source of foreign exchange, means that the regime cannot buy its way out of trouble. Mr Maduro’s personal approval ratings are little higher than 20%. Under the constitution, the government must hold parliamentary elections this year. If the opposition wins, that would improve its chances of being able to hold a referendum to recall the president in 2016. Mr Ledezma’s arrest and Mr Borges’s impending expulsion from parliament suggest that the government has no intention of allowing that to happen.

The crackdown goes much further. According to Carlos Ocariz, the head of the Venezuelan Mayors’ Association, 33 of the 78 opposition mayors elected since December 2012 face legal proceedings of some kind. Ms Machado is one of four opposition legislators (out of a total of 63) who have already been barred from parliament. A score of dissident leaders are in exile. Copei, a Christian democratic party, said on February 23rd that armed men had occupied a dozen of its offices as it prepared to endorse the proposal for a transitional government. Even ordinary citizens known to oppose the regime are barred from public-sector jobs or government benefits. One recent applicant for a government job says she was asked whether she belonged to a political party, “and if so, which one?”

The demand for Mr Maduro’s immediate resignation and a transitional government is controversial within the Democratic Unity alliance (MUD), a loose and sometimes fractious grouping of opposition parties. Its authors were the leaders of demonstrations against the government a year ago, which resulted in the deaths of 43 people, from both sides of the political divide. Mr López was arrested at the outset of the protests. Moderates like Mr Borges and Henrique Capriles, who lost to Mr Maduro in the 2013 presidential election, were opposed to them.

Some think the mayor’s arrest is meant to provoke a reprise of the demonstrations, which briefly boosted Mr Maduro’s popularity and would provide an excuse for further repression. If that was the plan, the opposition is too canny to fall for it. Violence would “lead nowhere”, wrote Mr Ledezma from prison. Ordinary Venezuelans have been holding protests against the regime; on February 24th a teenager was killed in one organised by students, apparently by a policeman’s rubber bullet. But demonstrations against the mayor’s arrest, like the one shown above, have been small.

Although there is disagreement over tactics, the MUD is united on the need to gain power democratically. Immediately after the mayor’s arrest the MUD announced that it would hold primaries in May to select candidates and demanded that the electoral authority—controlled by the government—schedule a date for the election.

The MUD’s bet on democracy would be slightly less quixotic if Venezuela’s neighbours and regional organisations were willing to apply serious pressure on the regime. Until now, they have mostly looked away while the chavistas suffocated dissent. The Organisation of American States, for example, has rejected calls by the opposition to debate Venezuela’s violations of the group’s democratic principles.

Mr Maduro’s latest crackdown is provoking more concern. A statement from Brazil, though mealy-mouthed, shows it is worried. The foreign ministers of Brazil, Colombia and Ecuador are to visit Caracas. They and other foreign ministers of the South American Union will then meet to discuss solutions to the crisis. If the slide to dictatorship is to be reversed, Venezuela’s neighbours need to discover some backbone. They have shown little so far.