Panama's Supreme Court has order the detention of former President Ricardo Martinelli to face charges that he illegally spied on opponents.

The supermarket magnate is accused of illegally intercepting the communications of 150 people during his 2009 to 2014 administration. He's been stripped of his immunity from prosecution in the case, as well as in another probe in which aides are accused of inflating contracts to purchase food for a government social program.

The court upheld a prosecutor's request to order the detention of the 63-year-old Martinelli after a judge declared him in contempt for failing to appear at a Dec. 11 hearing.

Martinelli, who has been outside the Central American country since January, has denied the charges and says he is the target of persecution by his successor.