GUATEMALA CITY (Reuters) - Former Guatemalan President Otto Perez accused the United States on Wednesday of helping to topple him by interfering in the Central American country and endorsing a United Nations-backed anti-corruption commission.

A Guatemalan judge ordered Perez on Tuesday to remain in jail while awaiting trial over a graft scandal that stoked a political crisis ahead of a presidential election, charging him with criminal association, taking bribes and customs fraud.

Guatemalan prosecutors and the powerful U.N.-backed anti-graft body CICIG moved against Perez after months of investigations and findings taken from some 89,000 telephone taps, almost 6,000 emails and 17 raids.

In a series of meetings that began early this year, the U.S. government pressured Guatemala's then-president Perez to rid his administration of corrupt officials and to renew the CICIG's mandate, officials with direct knowledge of the talks have told Reuters.

"Right now, we see the CICIG as an interference by the United States, which pressured most for this," Perez told CNN's Spanish-language television channel in an interview at the military prison where he is being held.

Asked if he believed the United States had helped oust him by pushing the corruption probe, he said: "Yes, definitely."

Perez, a 64-year-old retired general who was elected in late 2011 on a vow to fight crime and corruption, resigned as president last week, just as Guatemala headed into the first round of a presidential election.

He is being held in jail pending a hearing into accusations he made millions of dollars from a customs racket.

In the interview, Perez denied involvement in the scam that has implicated several high-ranking officials from his government, including his former vice president.

More than 20 other officials, including the president of the central bank, have been arrested in connection with the scam, although it is still unclear how much money was involved.