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

The multimillionaire supermarket tycoon is accused of intercepting the communications of at least 150 people during his 2009-14 presidency, including phone conversations and text messages. Martinelli also faces several other charges stemming from his time in office, including alleged misuse of public funds. He has been stripped of his immunity granted as head of a political party.

The 63-year-old Martinelli, who fled Panama earlier this year and is believed to be living in Miami, has denied the charges in a letter posted online earlier this month, saying he is the target of persecution by his successor.

Martinelli presided over Panama's economic boom during his presidency, bolstered by huge investments in infrastructure projects.