190427 Ricardo Martinelli
Panama's former President Ricardo Martinelli answers journalists questions while escorted by police to a hearing at the Supreme Court in Panama City. Image Credit: AP

Panama City: Former Panama president Ricardo Martinelli has asked to be allowed to vote from prison in next month's elections, days after authorities barred him from standing as a candidate.

The 67-year-old is in jail awaiting trial on a raft of charges after being extradited from the United States last year where he fled in 2015 to evade arrest.

Martinelli was put forward as a candidate for both mayor of Panama City and a national assembly seat by his Democratic Change party in elections scheduled for May 5.

The election commission declared his candidacy illegal because he had not lived in the constituency for at least a year prior to the vote.

In a recording broadcast by NexTv, Martinelli complained he was "illegally deprived of my freedom and of all my rights," and demanded to be able to vote - endorsing Romulo Roux for president.

Martinelli is accused of using state resources to spy on around 150 opponents during his time in office from 2009 to 2014. He is also being investigated for multiple corruption scandals.

Martinelli denies all charges, and says he is a victim of "political persecution".