MEDELLÍN, Colombia — Óscar Pérez, a helicopter pilot and former police officer who led an armed rebel band against the isolated and embattled government of Venezuela, was killed in a shootout with security forces, Venezuelan authorities announced on Tuesday, bringing an end to a dramatic event that unfolded a day earlier in videos on social media.

Mr. Pérez, 36, rose to prominence last year as a dissident police officer during street protests against President Nicolás Maduro. In June, he and a small group commandeered a helicopter in the capital, Caracas, and used it to drop grenades onto the Supreme Court building and fire on the Interior Ministry in a brazen midday attack.

Mr. Pérez then unfurled a banner calling on Venezuelans to rebel against Mr. Maduro, to the cheers of protesters below. He later released a video in which he and a band of masked men repeated their calls for a rebellion. While no one was injured in that attack, it was an embarrassment for the government, and officials vowed to capture him.

He had been a fugitive — and an online nuisance to the government — ever since, posting videos urging Venezuelans to resist what he called Mr. Maduro’s tyrannical government.