After storming a base in Venezuela's north-west, the men at the centre of the rebellion say it was not a coup.
Wearing military uniforms, they posted a video on social media calling for an uprising against President Nicolas Maduro.
"We declare ourselves in a state of legitimate rebellion, united today more than ever with the brave people of Venezuela to reject the murderous tyranny of Nicolas Maduro. This is not a coup. Above all, it is to save the country from total destruction and to end the killing of our young people and our family members."
Venezuelan authorities say the rebellion was swiftly contained.
But the residents of Valencia say hundreds of people took to the streets in support.
Police had to fire tear gas to disperse the crowds.
President Maduro says the men involved were mercenaries.
"I want to congratulate the National Bolivarian Armed Forces for the immediate reaction they had against the terrorist attack. A week ago, we beat them with votes, and, today, we had to beat terrorism with bullets. It won't be some terrorists coming from Miami and Colombia, some mercenaries, who slow the tempo of this country, of this revolution. United, we all move forward, with love."
It is not the first attack against the Venezuelan government.
In June there was a similar incident, when a helicopter flew over the interior ministry and began shooting.
The latest uprising comes after the creation of a new, pro-government legislative body, widely condemned as a power grab by President Maduro.
On its first day in session, the Constituent Assembly bypassed the country's opposition-led congress and swore in a new chief prosecutor, Tarek William, loyal to the president.
Mr William has warned the opposition against seeking a foreign military invasion of the country.
"The last option (of the opposition) should not happen, because it is a threat that is a cloud hovering over our people, and that is foreign military intervention. We will be found at the Attorney General of the Republic, which assumes its mandate because of the national Constituent Assembly, contributing its bit to the preservation of peace in this country and for national unity."
The head of the Constituent Assembly has promised what he calls a Truth Commission to identify, as he terms them, "fascists" and punish them.
But the ousted chief prosecutor, Luisa Ortega, has refused to go quietly.
An old ally of President Maduro, she broke away from him in March to become one of his most vocal critics.
As well as freezing her bank accounts, the Assembly has prevented Ms Ortega from leaving the country.
She has rejected her ousting, promising to stay in the job.
"The whole country is in ruins, a government that is an anti-government, that doesn't govern. What we Venezuelans want is to fix those things and, also, to have the right to participate, the right to say these things, and, for that reason, not to persecute us, not to persecute the Venezuelans -- the right to be able to have the spaces that belong to us and to not take those away from us. Once again, I call on the members of the (opposition-controlled) National Assembly: Do not allow that space to be taken from you."
Venezuela remains extremely volatile after four months of sustained anti-government protests.
At least 120 people have been killed.
The opposition has decried the state of affairs as the country's "slide" into a dictatorship.
The Inter-American Dialogue research centre's Michael Shifter has told the BBC the threat of further attacks against the government is now plausible.
"We know that there is enormous discontent in the country, with the Maduro government, and that's also reflected in the armed forces. It doesn't mean that the armed forces are about to switch or there's going to be a coup. It's very hard to know what this represents. But the fact that there's discontent and there are some uprisings and rebellions, I think, is not surprising, given the situation in the country."
Venezuela is in a deep economic crisis, and aid groups say there is a shortage of food and medicine.
International pressure is mounting on the Socialist government to dissolve the Constituent Assembly with its ability to change the constitution.