A former Venezuelan military intelligence head detained on the Caribbean island of Aruba over U.S accusations of drug-trafficking was released and flew home on Sunday, according to The Associated Press.

Instead of being extradited to the United States, retired General Hugo Carvajal flew home after the Netherlands government ruled he had diplomatic immunity, his lawyer and Venezuelan officials said, the AP reported.

Aruban authorities had argued previously that Hugo Carvajal, a former military intelligence chief, didn't have immunity from arrest because he had yet to be accredited by the Netherlands, which manages the foreign affairs of its former colony that sits off the coast of Venezuela, according to the AP.

But at a hastily called news conference in Aruba's capital, the island's justice minister said Carvajal was being let go because Dutch Foreign Minister Frans Timmermans decided Carvajal did have immunity, but also declared him "persona non grata," a term used by governments to remove foreign diplomats, the AP reported.

Carvajal, who ran military intelligence from 2004 to 2008 during the presidency of the late Hugo Chavez, was arrested on Wednesday after flying to the semi-autonomous island that is part of the kingdom of the Netherlands, according to the AP.

Jubilant Venezuelan officials at a congress of the ruling Socialist Party celebrated his release as a "victory" over their ideological foes in the United States, the AP reported.

"He's returning free and victorious. It's a triumph for sovereignty and legality," President Nicolas Maduro said, praising the "bravery" of the Dutch government, according to the AP.

Opposition politicians in Venezuela and the U.S. government say Carvajal bears responsibility for years of state connivance in the illegal drug trade and aid to Colombian guerrillas, the AP reported.

Washington put Carvajal on a blacklist in 2008, accusing him of protecting cocaine shipments from seizure by Venezuela anti-narcotics authorities and providing weapons and shelter to Colombia's FARC rebels on the border, according to the AP.