(CNN) -- A police helicopter launched a daring attack on the Venezuelan Supreme Court Tuesday, in a dramatic escalation of the months-long crisis engulfing the regime of President Nicolas Maduro.
The helicopter was apparently stolen and piloted by an officer in the country's investigative police force, Oscar Perez. As it strafed the court building and the Interior Ministry in Caracas, the attackers fired gunshots and lobbed grenades, officials said.
Maduro condemned the attack as an attempted coup, saying "terrorists" were behind the offensive and that an operation was under way to track the perpetrators down.
But much remained murky about the assault: if it was an attempt to unseat Maduro's government, it was a spectacular failure. No-one was injured and one of the grenades failed to explode, government officials said.
It was unclear how a rogue police helicopter could have circled high-profile buildings in the Venezuelan capital without being shot down. None of those involved in the attack appear to have been tracked down and the whereabouts of the helicopter remains unknown.
Perez, the apparent ringleader, was linked to a 2015 action film, Suspended Death, which he co-produced and starred in as an intelligence agent rescuing a kidnapped businessman, Reuters reported.
Earlier on Tuesday, Maduro appeared to foreshadow an uprising, saying that his supporters would be ready to take up arms if the "Bolivarian revolution" was threatened.
The attack came after months of protests against Maduro's regime and ahead of a vote on July 30 to elect members of a new body that could make changes to the country's constitution.
Before the attack began, a man who identified himself as Perez appeared in a video online saying an operation was underway to seize democracy back from Venezuela's "criminal government." Flanked by a group of men in military fatigues and balaclavas, Perez claimed to be speaking on behalf of a coalition of military, police officers and civil officials.
In his online video message, Perez said he was a pilot in the special response unit of Venezuela's Criminal Investigative Police (CICPC) and demanded that Maduro step down.
"On this day, we are carrying out a deployment by air and land with the sole purpose to return the democratic power to the people and to ensure the laws to establish constitutional order," he said.
Photographs posted online showed a helicopter with the initials of the investigative police unit on its side, flying above the capital, Caracas.
Through an open door an occupant is seen holding a banner saying "Article 350 libertad" -- referring to an article in the Venezuelan constitution that allows citizens to oppose the government should it subvert democratic principles.
Video of the incident shared on social media shows the helicopter approaching the Supreme Court complex at speed.
Another video which was shared online shows the helicopter landing on top of a building as a few people below cheered. The helicopter then took off again, although it's not clear where it went.
Minister for Communications and Information Ernesto Villegas called the attack an attempted coup.
He said the attackers launched four grenades, two against a group of National Guards who were protecting the court building.
He said that around 15 shots were fired around the Ministry of the Interior, a few blocks away from the presidential palace, while a social event was ongoing inside the building, celebrating the National Day of Journalists. Around 80 people were in the building, he said.
Maduro said he had activated government security forces to investigate the attack.
Earlier Tuesday, Maduro warned of a potential attack. Speaking at a rally, hs said, "f Venezuela was launched into chaos and violence and the Bolivarian Revolution was destroyed, we would go to combat.
"We would never give up. And what couldn't be done with votes, we would do it with weapons. We would liberate our fatherland with arms."
Villegas said the vote on the constituent assembly would go ahead as planned. "This will not impede the right to vote by the Venezuelan people on July 30th to elect the members of the National Assembly constituency," he said.
Critics have said it would also allow for the reshaping of the current legislative body, as well as redefine the President's executive powers.
Months of chaos
Venezuela is in the throes of a political and humanitarian crisis which has brought thousands of people onto the streets in mass protests demanding a change of government.
Soaring inflation and widespread shortages of medicines, food and other essentials have infuriated the local people, who are struggling to afford even basic necessities.
Under former president and Maduro's mentor, Hugo Chavez, oil revenue fueled Venezuela's economy. However, falling oil prices have made state subsidies unsustainable.
Anti-government protesters want Maduro to step down, accusing him of eroding democracy. Maduro, meanwhile, has sent the Venezuelan military onto the streets to maintain order, leading to deadly clashes. At least 75 civilians have died in the unrest, including the point-blank shooting of a 22-year-old protester by a soldier last week.
Split in Venezula's security forces?
Francisco Panizza, professor Latin American and comparative politics at the London School of Economics, said the upcoming National Assembly vote could have sparked the attack, adding up until now there had been no split in the security forces supporting Maduro.
"(They) are very heavily involved in the Maduro government, of course they have been key in terms of suppression of the demonstrations (against the government) ... the ultimate power now lies with the security forces, rather than the government itself," he said.
"If the security forces don't back up Maduro, he will have no future."
However, despite the claims made by the attackers, Panizza said there was no clear indication yet that this was the beginning of Venezuela's security forces turning against the President.
"This may be the first demonstration but I think we have to be very, very cautious to attribute this episode a broader connotation, as being part of a wider sort of movement within the security forces," he said. "We have no evidence of that yet."