Spain's National Court says it rejected the extradition to the United States of a former Venezuelan military spy chief accused of drug smuggling and other charges because the charges lacked detail and accepted the defense's claim that it was politically motivated.

The court's ruling released Tuesday said it rejected the request also because retired Maj. Gen. Hugo Carvajal had been acting under his military obligations when he committed the alleged crimes.

Carvajal was freed from a Madrid prison Monday. He headed Venezuela's military intelligence agency for more than a decade and was a close aide to former Venezuelan leader, Hugo Chávez.

EDS NOTE : SPANISH LAW REQUIRES THAT THE FACES OF MINORS ARE MASKED IN PUBLICATIONS WITHIN SPAIN. Accompanied by family members, former Venezuelan military spy chief, retired Maj. Gen. Hugo Carvajal, center, walks out of prison in Estremera, outskirts of Madrid, Spain, Sunday, Sept. 15, 2019. Spain's National Court has rejected the extradition to the United States of a former Venezuelan military spy chief accused of drug smuggling and other charges. Within hours of Monday's ruling, the court released retired Maj. Gen. Hugo Carvajal, who claimed that the extradition request was politically motivated. (AP PhotoManu Fernandez)

EDS NOTE : SPANISH LAW REQUIRES THAT THE FACES OF MINORS ARE MASKED IN PUBLICATIONS WITHIN SPAIN. Accompanied by family members, former Venezuelan military spy chief, retired Maj. Gen. Hugo Carvajal, center, walks out of prison in Estremera, outskirts of Madrid, Spain, Sunday, Sept. 15, 2019. Spain's National Court has rejected the extradition to the United States of a former Venezuelan military spy chief accused of drug smuggling and other charges. Within hours of Monday's ruling, the court released retired Maj. Gen. Hugo Carvajal, who claimed that the extradition request was politically motivated. (AP PhotoManu Fernandez)

The U.S. sought his extradition when he fled to Spain this year after publicly supporting opposition's efforts to oust Venezuelan President Nicolás Maduro.

The ruling can be appealed.