A former CIA operative detained in Panama this week at the request of Italian authorities over his conviction in the 2003 kidnapping of a Muslim cleric in Milan was released Friday and had boarded a flight to the United States, U.S. officials said.

Robert Seldon Lady’s release from Panama appeared to avert the possibility that he would be extradited to Italy, where he faces a sentence of up to nine years in prison for his role in the CIA capture of a terrorism suspect who was secretly snatched off a street in Milan and transported to Egypt.

Lady, who left Panama on Friday morning, was “either en route or back in the United States,” Marie Harf, State Department deputy spokeswoman, told reporters at a midday briefing.

It was not immediately clear what steps the United States had taken to secure Lady’s release.

The outcome brought a sudden close to brief diplomatic drama that began Wednesday when Lady was detained by border officials as he entered Panama.

Lady and 22 other U.S. government employees — most of whom worked for the CIA — were convicted in absentia in the case. Poor tradecraft allowed Italian investigators to track the movements of the American operatives in minute detail.

The case also highlighted the practice known as extraordinary rendition, in which terrorism suspects secretly captured in the years following the Sept. 11, 2001, attacks were delivered to governments suspected of engaging in torture.

Mario E. Jaramillo, the Panamanian ambassador in Washington, had confirmed Friday that Lady “has been arrested in Panama.” He added in an e-mail, “Procedures for this kind of international detentions are being followed by Panama at this moment.”

Jaramillo could not be reached immediately for comment on the report of Lady’s release and return to the United States.

Lady was the CIA base chief in Milan when Hassan Mustafa Osama Nasr, known as Abu Omar, was bundled into a van as he walked to a mosque. Nasr was secretly flown out of Italy and delivered to Egypt, according to Italian court records.

Although U.S. intelligence officials have said that the Italian intelligence service sanctioned the operation, Italian prosecutors pursued U.S. officials on kidnapping and other charges.

Lady has been living in Latin American, according to former colleagues at the CIA. All of the Americans convicted in the case had left Italy before trial.