Jonathan “Jack” Idema, a former Green Beret from North Carolina who was convicted of running a private jail in Afghanistan where he tortured terrorism suspects, died Jan. 21 in the Mexican state of Quintana Roo. He was 55.

The regional director-general of police in Quintana Roo, Arturo Olivares Mendiola, said Mr. Idema died of AIDS. No one had come to claim his body from the medical examiner’s office, Olivares Mendiola said.

Mr. Idema had moved to Mexico at some point after being released from prison in Afghanistan in 2007, when he was pardoned by President Hamid Karzai as part of a general amnesty.

Mr. Idema, a native of Poughkeepsie, N.Y., joined the Army in 1975 and was a Special Forces soldier until 1978. He settled in Fayetteville, N.C., and began a long series of bizarre and sometimes criminal misadventures while pursuing the national spotlight.

He was, among other things, a plaintiff in numerous unsuccessful lawsuits. He once sued Steven Spielberg, saying the filmmaker stole his life story for a movie.

Mr. Idema also spent three years in jail in the 1980s after being convicted of fraud.

After the terrorist attacks of Sept. 11, 2001, Mr. Idema traveled to Afghanistan, where he claimed he was close to catching Osama bin Laden. His claims led to his being featured in several books and television programs.

In 2004, he returned to Afghanistan with another former soldier and a freelance videographer. They ran a private jail in which terrorism suspects were tortured for information.

Although he was convicted, Mr. Idema denied torturing anyone. “Nobody was hung upside down,” he said in a 2004 interview with the Associated Press. “Nobody was burned with cigarette butts . . . nobody was beaten, nobody was tortured, nobody had boiling water poured on them. Did we interrogate people? Absolutely. Did we keep them up with sleep deprivation? Absolutely.”

He claimed that his operation was conceived with the knowledge and support of U.S. and Afghan military authorities, which they denied, saying any connection was entirely in his imagination.

The two other Americans were released from prison before Mr. Idema.

“He had charisma,” Penny Alesi, a former girlfriend, told the Fayetteville Observer in North Carolina. “He was funny. He was smart — oh, my God, smart and well-read, but toxic. Truthfully, he was a sociopath.”