One week after his arrest, Martinelli’s lawyer asked a Miami federal judge Tuesday to release the 65-year-old businessman on bond while he fights his extradition on charges of misusing millions in Panamanian government money to pay for a spying operation against his political enemies.

Marcos Jimenez, a former U.S. attorney in Miami, raised a host of defenses attacking Martinelli’s detention and the extradition request, claiming that as a former Panamanian president he has immunity, that there’s no basis for the charges and that the warrant for his arrest was flawed. He argued that Martinelli should be granted a bond and that Panama’s extradition complaint should be dismissed.

Then, Jimenez leveled the biggest counter punch.

Be the first to know.

No one covers what is happening in our community better than we do. And with a digital subscription, you'll never miss a local story.

“The charges against [former] President Martinelli are transparently motivated by politics, as evidenced by the fact that he fired the sitting president of the country that is seeking his extradition,” Jimenez said in a court filing and to the magistrate judge. The lawyer noted that in 2011, Martinelli fired Juan Carlos Varela as foreign minister after learning that he was allegedly receiving kickbacks from foreign consulate officers.

Jimenez also cited a recent interview in Panama with one of the Martinelli case judges, who said on a scale of 1 to 10 that the independence of the Panamanian judiciary that approved the extradition charges would rate in the “negative numbers.”

Assistant U.S. Attorney Adam Fels, who is representing Panama’s extradition request for the former president, countered that the warrant for Martinelli’s arrest in Miami “functions in the Panamanian legal system as the warrant” for the criminal charges, concluding it was valid.

After a two-hour hearing, Magistrate Judge Edwin Torres said he will decide by next week whether to grant Martinelli a bond and consider the defense motion to dismiss the extradition complaint. If he does agree to a bond, the judge said he will hold another hearing on the conditions, which could be as high as $7 million under a proposal by Martinelli’s legal team. After the bond issue is resolved, Torres could move ahead with Panama’s extradition petition.

Under U.S. extradition law, the magistrate judge would have to find there is a factual and legal basis for Panama’s extradition request. The U.S. secretary of state would then weigh in on the extradition of Martinelli as a final step.

The former president is accused of intercepting and recording the private conversations of political allies and opponents, judges, journalists, businessmen, union activists, and even his mistress, according to a complaint filed by the U.S. Attorney’s office in Miami, which cited Panama’s extradition request.

Martinelli, who served as president from 2009-2014, has been charged in Panama with embezzlement, interception of communications, and tracking, persecution and surveillance without judicial authorization, the complaint says.

The money used to pay for the surveillance system — about $13.4 million — had been allocated to a fund that was supposed to “improve the quality of life for underprivileged persons,” the complaint says. Instead, the funds bankrolled intelligence-gathering operations that produced daily reports for Martinelli and sometimes gleaned “particularly sensational audio or video,” including of political opponents having sex, that the complaint says Martinelli instructed security personnel to upload to YouTube.