PANAMA CITY — Former Panamanian President Ricardo Martinelli has made a noisy court appearance ahead of a ruling on whether he should stand trial for alleged political espionage.

The 66-year-old ex-leader raised his handcuffed hands above his head and shouted at reporters, saying "I'm innocent!" He accused Judge Geronimo Mejia of wanting to prosecute him to win a Supreme Court seat from current President Carlos Varela.

Mejia said the hearing could take time and asked for patience.

Martinelli is accused of intercepting the communication sof at least 150 people and spending millions on spy equipment during his 2009-2014 term.

He was extradited from the U.S. in June.