Updated

A police helicopter fired on Venezuela's Supreme Court and Interior Ministry in what President Nicolas Maduro said was a thwarted "terrorist attack" aimed at ousting him from power.

The confusing exchange, which is bound to ratchet up tensions in a country already paralyzed by months of deadly anti-government protests, took place as Maduro was speaking live on state television Tuesday. He later said the helicopter had fired on the pro-government court with grenades, one of which didn't go off, helping avoid any loss of life.

Adding to the intrigue, pictures of a blue police helicopter carrying an anti-government banner appeared on social media around the same time as a video in which an alleged police pilot, identified as Oscar Perez, called for a rebellion against Maduro's "tyranny" as part of a coalition of members of the country's security forces. Authorities said they were still searching for the man.

"We have two choices: be judged tomorrow by our conscience and the people or begin today to free ourselves from this corrupt government," the man said while reading from a statement with four people dressed in military fatigues, ski masks and carrying what looked like assault rifles standing behind him.

Many of Maduro's opponents took to social media to accuse the president of orchestrating an elaborate ruse to justify a crackdown against Venezuelans seeking to block his plans to rewrite the constitution. Venezuela has been roiled by anti-government protests the past three months that have left at least 75 people dead and hundreds injured.

After the incident, Maduro sounded alternately calm and angry as he told the audience about what had happened in the airspace just beyond the presidential palace.

"It could've caused a tragedy with several dozen dead and injured," he said, calling it a "terrorist attack."

Later, Information Minister Ernesto Villegas read a statement from the government accusing the helicopter of firing 15 shots against the Interior Ministry as a reception was taking place for 80 people celebrating national journalist's day. It then flew a short distance to the court, which was in session, and launched what he said were four Israeli-made grenades of "Colombian origin," two of them against national guardsmen protecting the building.

The pro-government president of the high court said there were no injuries from the attack and that the area was still being surveyed for damages.

Villegas said security forces were being deployed to apprehend Perez as well as recover the heisted German-built Bolkow helicopter. Photos of the pilot standing in front of the U.S. Capitol in Washington and a U.S. Coast Guard helicopter were displayed on state television to further bolster the government's case that he was taking instructions from the CIA and the U.S. Embassy.

Maduro said one of the pilots involved in the alleged attack used to fly for his former interior minister, Miguel Rodriguez Torres, who he accused of working for the CIA. Rodriguez Torres, who has been leading a campaign against Maduro made up of leftist supporters of the late Hugo Chavez, immediately dismissed the accusation as baseless.

As the drama was unfolding outside the court, inside magistrates were busy issuing a number of rulings further hemming in the opposition. One dismissed a challenge against Maduro's plans for a constitutional assembly by chief prosecutor Luisa Ortega Diaz, a longtime loyalist who broke with the government over the issue.

The helicopter incident capped a volatile 24 hours that began with widespread looting in the coastal city of Maracay on Monday night and continued Tuesday when opposition lawmakers got into a heated scuffle with security forces assigned to protect the National Assembly.

At least 68 supermarkets, pharmacies and liquor stores were looted and several government offices burned following anti-government protests in Maracay, which is about a 90 minute drive from Caracas.

Maduro condemned the violence but with a stern warning to his opponents that's likely to only further inflame an already tense situation.

"We will never surrender. And what we couldn't accomplish through votes we will with weapons," he said.

On Tuesday, opposition lawmakers got into fisticuffs with national guardsmen as they tried to enter the National Assembly. In a video circulating on social media, the commander of a national guard unit protecting the legislature aggressively shoved National Assembly President Julio Borges as he's walking away from a heated discussion.

At nightfall, a few dozen people were still gathered inside the neoclassical building as pro-government supporters stood outside threatening violence.