The new secretary general of the Organization of American States resigned yesterday because of accusations that he took a bribe in 2001 while president of Costa Rica.

In a letter to the 34-nation organization, Miguel Angel Rodriguez denied he did anything wrong.

"With humility, pain and anguish, I ask you and your countries for forgiveness for making you endure this difficult period," Rodriguez said in his letter, which was read to OAS members here yesterday by Costa Rica's ambassador to the OAS, Luis Guardia.

Rodriguez wrote that he was leaving because he did not want to expose the OAS to a "cruel and long persecution of its secretary-general" in Costa Rican courts and in the news media.

Rodriguez has been accused of receiving a bribe in connection with the awarding of a $149 million contract to the French telephone company Alcatel in 2001 for cell phone service. Yesterday, the former president learned that Costa Rica's attorney general had concluded that Rodriguez does not enjoy immunity from any prosecution resulting from the allegations.

The resignation represented a surprising and sudden turnaround at the OAS, where Rodriguez had become the first Central American to serve as secretary general.

Rodriguez was sworn in for his five-year term only two weeks ago, and now he is the first secretary general in the organization's 115-year history to resign because of corruption charges. In the June OAS meeting at which Rodriguez was selected, the organization declared that fighting corruption would be a priority.

American Luigi Einaudi, a former State Department official and the second-ranking official in the OAS, will replace Rodriguez until the organization meets again to select another candidate.

In his resignation letter, Rodriguez said he had realized that he would need a lot of time to defend himself in Costa Rica and that the defense would take too much time for an OAS secretary general. OAS officials said that Rodriguez was in Houston with his family.

Abel Pacheco, who succeeded Rodriguez as president of Costa Rica in May 2002, has said Rodriguez could not adequately explain how money from the French company ended up in a Washington bank account held by his wife. In local newspapers, Rodriguez has said that the money was a personal loan and that there is no paper trail because the deal was done on his word of honor.

State Department spokesman Noel Clay said the United States did not seek Rodriguez's resignation and will be "consulting with others to determine how to proceed" in selecting a successor. "In the meantime, the OAS secretariat will be in good hands with Luigi Einaudi after [Rodriguez's] departure next week," Clay said. The OAS does not officially meet again until next June, but officials said a special session may be called.

Costa Rica has been something of a model of Latin American stability and prosperity and is not known as a place where corruption is rampant. Having a former president selected to the OAS post was seen as a major coup and a sign of Costa Rica's emergence on the international scene. Eleven heads of state and government attended Rodriguez's Sept. 23 swearing-in ceremony at OAS headquarters here.

When allegations against Rodriguez became public soon after his installation, Pacheco and most of the Costa Rican Legislative Assembly asked the former president to resign.

"This was an unavoidable exit," said Rodolfo Gil, Argentina's permanent representative to the OAS and one of the ambassadors who had been most outspoken against Rodriguez. "We believe that Rodriguez did what he had to do, which was to resign and open the road to a new institutional path where the secretary general is not tainted by suspicions of corruption.

"There was no benefit of the doubt possible. In politics you have to be like Caesar's wife."

Staff writer Marcela Sanchez contributed to this report.