PANAMA CITY — Panama has formally asked the United States to extradite former President Ricardo Martinelli in connection with a phone-tapping controversy, the country’s foreign ministry said Tuesday.

The case involves allegations that the phones of dozens of business, opposition and labor leaders were tapped by Martinelli’s 2009-2014 government.

The foreign ministry said the extradition request was made through its embassy in Washington late Monday.

Martinelli has denied any wrongdoing and contends the case is political persecution by his successor, President Juan Carlos Varela.

In a message on his official Twitter account Tuesday that appeared to refer to the case, Martinelli said Varela’s government is using his political persecution to draw attention away from its own ineptitude.

Martinelli spokesman Luis Eduardo Camacho said via Twitter that the extradition request was illegal.

A detention order was issued for the 64-year-old Martinelli in December after he failed to appear in court. He is believed to be living in Miami.

The U.S. Embassy in Panama did not respond to a request for comment.

Besides the wiretapping, Martinelli is accused of buying $13 million worth of surveillance equipment using money from businesses with government contracts during his administration. The equipment is missing.