Rodrigo Abd, Associated Press
A boy dressed in a Spiderman costume poses for a photo next to a mural of Venezuela's late President Hugo Chavez painted on a wall of the Museo de Bellas Artes in Caracas, Venezuela, Tuesday, March 4, 2014.

KINGSTON, Jamaica — Authorities in Aruba have detained a close confidant of former President Hugo Chavez who had been appointed Venezuela's consul to the Caribbean island despite being sanctioned by the U.S. government for involvement in drug trafficking.

Hugo Carvajal, the former head of military intelligence, was arrested at the request of the U.S. prosecutors and is expected to appear in an Aruban court on Friday.

Carvajal was one of a number of high-ranking Venezuelan military officials sanctioned by the U.S. Treasury in 2008 for allegedly providing weapons to Marxist rebels in neighboring Colombia and helping them smuggle cocaine out of the country. Despite the charges, he remained close to power circles in Venezuela and in January was appointed consul to Aruba by Chavez's successor, Nicolas Maduro.

Venezuela immediately condemned Carvajal's arrest, calling it a "grave violation" of international law and the Vienna Convention granting diplomats immunity from arrest.

It called on the Netherlands, which manages foreign affairs for the otherwise autonomously run island, to immediately reverse the "illegal detention" so it doesn't affect extensive commercial and diplomatic ties.

Officials in Aruba said they were initially confused about whether Carvajal had immunity from arrest since he holds a diplomatic passport from Venezuela. However, they went ahead with the detention because he had yet to receive his accreditation by the local government.

"Immunity is always linked to a function," prosecutors' spokeswoman Ann Angela said in a Thursday phone interview. "And he does not have any function here in Aruba. He is not the consul general therefore he has no immunity."

U.S. prosecutors now have 60 days to formalize their extradition request, Angela said.

The U.S. State Department did not immediately respond to a Thursday call seeking comment.

Goodman reported from Bogota, Colombia