(Reuters) - A federal judge in Miami on Thursday said former Panamanian President Ricardo Martinelli should be extradited to his homeland to face charges he illegally orchestrated a campaign funded by public money to spy on political rivals there.

FILE PHOTO: Ricardo Martinelli gestures during a news conference at the Presidential Palace in Panama City, Panama on April 19, 2012. REUTERS/Carlos Jasso/File Photo

U.S. Magistrate Judge Edwin Torres said Panama had established probable cause for all charges it brought against Martinelli, and that a show of “good faith” to its government required his surrender.

“There are reasonable grounds to suppose him guilty of all or some of the offenses charged,” Torres wrote in a 93-page decision.

The U.S. Department of State will decide whether to extradite Martinelli, but in an Aug. 1 court filing said it supported extradition. It is not clear when a decision might be made.

Martinelli, 65, has denied the charges, and plans to appeal the extradition order, according to an email from his lawyer Marcos Jimenez. He is also seeking political asylum.

Officials with the Panamanian government did not immediately respond to requests for comment.

Martinelli was Panama’s president from 2009 to 2014.

Prosecutors accused him of diverting more than $13.4 million of public funds, intended to help the underprivileged, to fund a surveillance system to listen in on more than 150 rivals.

Martinelli, a wealthy businessman through his ownership of supermarkets, was arrested in June by U.S. authorities in Coral Gables, Florida, and later held without bail.

He had previously left Panama as that country was preparing to charge him.

Panama’s current president, Juan Carlos Varela, had once been Martinelli’s vice president, but they later became rivals.

Martinelli’s lawyers have called their client’s prosecution politically motivated.

They had sparred with U.S. prosecutors over whether an extradition treaty updated in July 2014 between the United States and Panama covered Martinelli’s alleged cyber crimes, which predated the update.

Torres said it did, and that Martinelli’s having “at best” suggested the issue was ambiguous was “not enough to conclude that his interpretation ultimately prevails and bars his extradition.”