Officials in Venezuela confirmed Tuesday that a rebellious police officer who led a brazen helicopter attack in Caracas last year was among those killed in a violent shootout with security forces.

Oscar Perez was among the seven who died fighting against police and soldiers Monday in a small mountain community outside of Caracas, Interior Minister Nestor Reverol said.

Two police officers were killed and eight others gravely injured, he said.

"The terrorist acts committed by this terrorist cell showed the destabilizing objectives that they were pursuing," Reverol said.

Oscar Perez video

Oscar Perez, a Caracas police pilot, reads his manifesto calling for rebellion, in a video posted online on June 27, 2017. (YouTube)

Opposition lawmakers and human rights groups called for a transparent investigation into the deaths after video images showed Perez shouting over gunfire that they wished to surrender.

"We're going to turn ourselves in!" Perez said in the video.

A former police officer, action-movie star and pilot, Perez leaped into the spotlight in June, when he stole a helicopter and used it to lob grenades and fire at two government buildings in Caracas. Nobody was killed in the attack.

Perez, 36, had been one of Venezuela's most wanted fugitives ever since, periodically posting videos on Instagram calling upon Venezuelans to take to the streets against what he called President Nicolas Maduro's tyrannical government.

Perez claimed that he was fighting for Venezuela's freedom from a government that is starving its people. He garnered tens of thousands of followers online and has piqued the curiosity of Venezuelans who either hail him as hero, condemn him as a criminal or questioned if he might be a ruse to support Maduro's assertion that the nation is under attack by opposition conspirators.

In December, Perez posted videos showing him and a small armed band taking over a military outpost and smashing a portrait of Maduro with his foot. Perez and the assailants berated several detained guardsmen for doing nothing to help their fellow citizens.

AFP_WQ1KW

An armoured tank from the Venezuelan army drives along a highway in Caracas as the operation to capture Perez unfolded. (Juan Barreto/AFP/Getty Images)

Perez surfaced online again early Monday in videos — blood dripping across his face — and holed up in a mountainside house. Perez shouted over a spray of gunfire that the group wished to surrender, but that the police outside were set on killing them.

"I want to ask Venezuela not to lose heart — fight, take to the streets," he said. "It is time for us to be free, and only you have the power now."

Reverol said that an intense search finally led security forces to the house. Perez's group opened fire first, requiring a response from authorities, he said.

VENEZUELA-POLITICS/POLICE

Perez poses for photographs while he was still a police helicopter pilot in Caracas, March 1, 2015. (Christian Veron/Reuters)

Troops arrested another six people identified as members, collaborators and financiers of the group. They also confiscated rifles, smoke grenades, military uniforms, ammunition, and a pickup, officials said.

Mystery surrounded Perez's fate for nearly 24 hours as officials remained silent until the announcement on state television that he was among the dead.

The Venezuelan Program of Education and Action on Human Rights has called for the government to provide a full report. The opposition-controlled National Assembly early Tuesday formed a special commission to conduct its own investigation.

"How is it possible that while surrendering, they riddled him with bullets?" said Delsa Solorzano, the National Assembly deputy assigned to head the commission.

Solorzano called for the government turn the bodies over to relatives rather than cremate them, allowing for a transparent investigation.

In a speech to the military late on Tuesday, Maduro lauded the operation and accused right-wing opponents of being behind Perez.

"The Miami-based counterrevolution and the Colombian oligarchy must know that every group they arm and finance to bring terrorism here will be met with the same fate," Maduro said in the hours-long event broadcast on state television.

With files from Reuters