PANAMA CITY -- Panama's Supreme Court decided Wednesday to open a corruption probe against former President Ricardo Martinelli, a move likely to rally popular support in a nation where the politically powerful rarely face justice for misdeeds.

A person close to the high court said all nine judges voted to appoint a special prosecutor to investigate Martinelli over allegations he inflated contracts worth $45 million to purchase dehydrated food for a government social program. The person insisted on speaking anonymously because the ruling hasn't been made public.

The accusation is based on the testimony of a political ally, Giacomo Tamburelli, the former head of the National Assistance Program who has said he was taking orders from the then president to inflate contracts. He is now under house arrest.

Martinelli, a billionaire supermarket magnate, has denied the charges and says he is the target of political persecution by his successor, Juan Carlos Varela, who broke with the government in 2011 while serving as Martinelli's vice-president and foreign minister.

Varela later accused Martinelli and his sons of taking kickbacks from an Italian military contractor and successfully campaigned for the presidency on a pledge to clean up politics.

Martinelli travelled Wednesday to Guatemala to attend a session of the Central American parliament amid media speculation he would seek asylum. The former president has denied he is fleeing justice but his lawyers have argued that as a member of the regional assembly he is immune from prosecution. He did not immediately comment on Wednesday's ruling.

The swiftness with which the case against Martinelli and a half-dozen close aides have proceeded has come as a shock to the 3.5 million Panamanians, who are accustomed to impunity after decades of military rule and a rocky transition to democracy following the 1989 U.S. invasion that did little to root out corruption.

In recent weeks a number of former officials have come forward with damaging accusations that would seem to confirm longstanding perceptions of widespread graft during Martinelli's administration.

In one case, prosecutors seized a yacht, mansion and other assets worth $18 million allegedly paid for with kickbacks to another close Martinelli aide who succeeded Tamburelli as head of the government's leading social program. The former official, Rafael Guardia, has also fingered Martinelli and his personal secretary.

"What happened to the National Assistance Program happened at every institution during the last government," said Roberto Eisenamann, founder of the newspaper La Prensa, which rose to prominence in the 1980s by exposing corruption by dictator General Manuel Noriega.

Varela has vowed to keep his hands off government institutions. His approval rating, at over 60 per cent, is the highest of any head of state in Latin America