In another attack last year, a group of soldiers struck a military barracks west of Caracas. Like Mr. Pérez, they released videos calling for others to join their cause, but no rebellion materialized.
And in 2016, Mr. Maduro himself was attacked by a mob who chased him down the street banging pots and pans and screaming that they had no food.
Despite widespread discontent, Mr. Maduro continues to hold power. His most popular rivals were banned from running in elections this spring, and opposition parties boycotted and said the vote was rigged.
Analysts said Saturday that while the attack might be used to drum up support for the president, it was a deep embarrassment for Mr. Maduro.
“It will boost his rhetoric and give some substance to his conspiracy theories,” said David Smilde, an analyst at