(CNN) -- In July 2009, the U.S. ambassador in Panama received an unexpected message on her BlackBerry. It came from newly elected President Ricardo Martinelli, and said simply, "I need help with tapping phones."
According to a diplomatic cable written in August 2009, which was obtained and published by the website WikiLeaks, then-Ambassador Barbara J. Stephenson did not reply to the message but subsequently expressed her concern that the Panamanian leader wanted "to conduct wiretaps against ostensible security threats as well as political opponents."
The response from Panamanian officials was that an "anti-corruption campaign is taking on powerful and corrupt individuals... Some of those individuals may attempt to retaliate by threatening Martinelli's personal safety."
The Panamanian leader, who leads a right-of-center government, also feared that he would be "a target of leftist governments in the region who will attempt to infiltrate Panama's trade unions and destabilize the GOP (government of Panama.)"
The leaked cable says U.S. diplomats in Panama drew a sharp distinction between a secret court-sanctioned wiretap program known as "Operation Matador" -- targeting drug traffickers -- and "any effort to expand wiretaps to domestic political targets." The existence of Matador has not been officially confirmed, but several leaked cables regarding Panama and other countries refer to an extensive international wiretap program run by the U.S. Drug Enforcement Administration.
In a cable marked "secret," the ambassador said "Martinelli's seeming fixation with wiretaps and his comments to Ambassador during an August 12 meeting demonstrate that he may be willing to set aside the rule of law."
"He made reference to various groups and individuals whom he believes should be wiretapped, and he clearly made no distinction between legitimate security targets and political enemies," the cable continued.
Referring to businessmen who had received corrupt concessions from his political opponents, "Martinelli promised to 'throw them to the sharks.' He chided the Ambassador for being 'too legal' in her approach to the issue of wiretaps."
When Martinelli apparently suggested that anti-narcotics cooperation with the United States might be affected should he not get help with wiretapping, Stephenson responded that "she would readily inform Washington and we would all see Panama's reputation as a reliable partner plummet dramatically."
The cable illustrates the dilemma for U.S. diplomats: helping foreign governments combat corruption and organized crime may sometimes lead to less legitimate requests.
It ends with a withering analysis. "Martinelli's near-obsession with wiretaps betrays a simplistic and naive attitude toward the criminal investigative process," it says. "He appears to believe that wiretaps are the solution to all of his crime problems, and seems unable to grasp the concept that wiretaps are only one tool in the investigative process."
Not mincing words, the ambassador adds: "A president only gets his 'first hundred days' once, and Martinelli is spending his obsessing about vengeance against his political foes. Most of his government appointments have favored loyalty over competence."
Referring to his background as a supermarket tycoon, the ambassador adds: "His penchant for bullying and blackmail may have led him to supermarket stardom but is hardly statesmanlike."
Martinelli's behavior also appears to have embarrassed his own foreign minister, who told the ambassador that "he hates Martinelli's bluster but has not yet convinced him that whatever his persona is as 'Ricardito,' such behavior is inappropriate for the President of the Republic."
Relations continued to be difficult. Later in 2009, the United States decided to remove the Matador wiretap program from control of the Panamanian government's Council for Public Security and National Defense, which had led to a threat to expel the U.S. Drug Enforcement Administration from Panama.
A cable from December 2009 notes: "All of this comes at a time when Panama's judicial institutions are under assault by the executive, with Martinelli's strong political pressure on the attorney general and the controversial appointment of two Martinelli political cronies to the supreme court."
It comes with a recommendation: "If we cannot guarantee with a high level of confidence that the Matador program will not be misused for political purposes, then we prefer to suspend the program."
Stephenson has since moved to a posting in London. Media reports suggest that Matador was suspended earlier this year, but the U.S. State Department refuses to comment on the contents of cables published by WikiLeaks. A Panamanian official told local television that the ambassador's cables had arisen out of a "mistaken interpretation" of President Martinelli's remarks.