(Amber Ferguson/The Washington Post)

A Venezuelan police pilot apparently commandeered a helicopter Tuesday and flew it over the supreme court building carrying a sign that read “Freedom,” a public show of dissent against the embattled government that prompted security forces to seal off government facilities and heightened fears of further unrest.

During a chaotic afternoon in the capital, pro-government protesters also surrounded the National Assembly building, forcing legislators to remain inside, and tanks were spotted driving around the palace of President Nicolás Maduro.

After three months of near daily protest, Venezuela is on a hair trigger. The news of the dissident pilot and the mobilization of security forces prompted coup rumors to race through Venezuelan social networks. By Tuesday evening, however, it appeared that Maduro’s government remained in control.

In the late afternoon, Caracas residents saw a blue helicopter from the police investigations unit, the CICPC, circling the capital, carrying a banner that read “Libertad” and the number “350,” a reference to the article in the Venezuelan constitution that allows people to “disown” their government if it acts in an undemocratic way.

The helicopter circled over the building housing the supreme court, which has backed Maduro’s efforts to block early elections and to change the constitution.

Tanks were spotted driving around Miraflores, the palace occupied by President Nicolás Maduro. (Ariana Cubillos/AP)

The communications minister said that the helicopter dropped four grenades and that three exploded. The government reports could not be independently verified.

Venezuelan news reports identified the pilot as Oscar Perez, a member of military special forces, citing his posts to social media. The reports note that Perez has acting experience, having produced and starred in a Venezuelan film, “Death Suspended.” Wearing a uniform and reading from notes, he spoke into a video camera about the “criminal government” as four masked men with guns stood behind him. Describing his group as a nonpartisan alliance of military, police and civilian officials, Perez said that their fight was not against the rest of the security forces.

“It’s against the impunity imposed by this government,” he said. “It’s against tyranny. It’s against the deaths of young people who are fighting for their legitimate rights. It’s against hunger.”

It was not immediately clear whether there was any wider security-forces movement against Maduro’s government. Some Venezuelans wondered whether the helicopter incident was staged to justify further deployments of the security forces.

“Right now, I only see two possibilities: Either the pilot was tricked or it was staged,” said Félix Seijas Rodríguez, a political analyst in Caracas. “It makes no sense.”

Venezuelan opposition groups and protesters have been outraged by the Maduro government’s attempts to dissolve the National Assembly and change the constitution, as well as by the near daily clashes between security forces and protesters. More than 70 people have died, and at least 1,000 have been injured. Thousands have been arrested, and detainees have alleged physical and mental abuse by security forces.

Maduro, who has presided over an economic collapse that has caused extreme shortages of food and medicine, has refused to back down. On Tuesday, he said during a rally before supporters that his government was willing to use weapons to preserve the socialist movement started by Hugo Chávez, who died in 2013.

“If Venezuela was plunged into chaos and violence and the Bolivarian Revolution destroyed, we would go to combat,” Maduro told the crowd. “We would never give up, and what couldn’t be done with votes, we would do with weapons.

“We would liberate the fatherland with weapons.”

Maduro, who has long accused the United States of propping up his enemies, also called out President Trump, saying: “You have the responsibility: Stop the madness of the violent Venezuelan right wing.”

After the helicopter incident, National Guard and other security personnel in Caracas took positions around government buildings, including Miraflores, the presidential palace. Maduro said he had ordered the armed forces on high alert to “keep the peace.”

At the National Assembly, pro-government gangs known as “colectivos” — which often ride around on motorcycles and are known for violence — temporarily prevented a group of lawmakers from leaving.

Partlow reported from Mexico City. Nick Miroff contributed to this report.