(CNN) -- In a shocking twist to an already bizarre and riveting mystery, Thai police on Thursday said the man arrested in connection with the 1996 slaying of little JonBenet Ramsey has confessed to the crime.
The suspect, John Mark Karr, 41, told interrogators that he didn't mean to kill the 6-year-old girl, authorities said.
Karr's arrest came nearly a decade after the body of the child beauty queen was found in the basement of her family's sprawling Boulder, Colorado, home -- setting off a media sensation and years of speculation regarding her killer.
Karr is a former schoolteacher and an American citizen. He was arrested at his apartment in Bangkok.
Lt. Gen. Suwat Thamrongrisakul, chief of Thai immigration, said Karr had confessed to killing JonBenet Ramsey but that he claimed the killing wasn't intentional.
According to colleagues at the Thai detention center where Karr was questioned, the suspect asked police what charges he was facing and when they replied first-degree murder, he said: "No, it's second-degree -- it wasn't intentional," Suwat said during a news conference in Bangkok.
Karr will be extradited to Boulder within the next week and has been charged with murder, kidnapping and sexual assault on a child, Ann Hurst, Department of Homeland Security attache at the American Embassy in Bangkok, said. Thai officials said Karr's visa had been revoked.
The former schoolteacher had been a suspect for "a while," Hurst said, adding that her office and the Thai police worked closely for two months on the case before a judge believed there was enough probable cause for an arrest.
Karr was "surprised" when he was arrested at his Bangkok apartment Tuesday, according to Hurst, who was present at the time, and asked why he was being detained. (Watch how DNA evidence could be key in the case -- 4:50)
Two law enforcement sources told CNN that Karr was under investigation for an unrelated sex crime when information led to his arrest in the Ramsey case.
Mary Lacy, the district attorney in Boulder, said in a written statement the suspect was arrested "following several months of a focused and complex investigation." Lacy's statement did not identify the suspect. (Watch how the investigation was a "complex" one -- 1:51)
Law enforcement officials said the investigation was being led by the Boulder County District Attorney's Office, along with U.S. Immigration and Customs Enforcement.
A horrific slaying
The arrest will likely dispel the cloud of suspicion that has hung over JonBenet's parents, John and Patsy Ramsey, ever since the girl's death on Dec. 26, 1996 in their Boulder home. (Watch John Ramsey react to news of the arrest -- 2:17)
It was John Ramsey who found his daughter's body. Earlier that morning, the girl had been reported missing, and Patsy Ramsey reported finding a three-page ransom letter demanding $118,000 on a staircase in the home.
Autopsy results showed JonBenet had received a massive blow to the head and was strangled with a rope that the killer tightened by twisting an attached paint brush handle.
The Ramseys maintained an intruder killed their daughter, but they remained the subject of suspicion and speculation in the case, which provided years of fodder for news networks and tabloids. Though no one was ever named as a suspect, at one point the Boulder police said the Ramseys were under "an umbrella of suspicion."
Officials: Online communications were key to probe
Karr confessed to some elements of the crime, law enforcement officials earlier told CNN, and had been communicating off and on with someone in Boulder who was working with law enforcement on the case. Earlier, CNN affiliate KUSA had reported that the elements the suspect had confessed to were unknown to the public.
Karr's online communications were a key part of the probe, the officials said.
The arrest came too late for Patsy Ramsey, who died in June of ovarian cancer at age 49. However, John Ramsey said he and his wife knew investigators were pursuing a suspect prior to her death.
"The investigation of the individual arrested today in connection with JonBenet's death was discussed with Patsy and me by the Boulder district attorney's office prior to Patsy's death in June," he said in a written statement. "So Patsy was aware that authorities were close to making an arrest in the case and had she lived to see this day, would no doubt have been as pleased as I am with today's development almost 10 years after our daughter's murder." (Read the full statement)
John Ramsey told KUSA on Wednesday, "I was notified this morning that an arrest had been made. I'm just absolutely impressed with the effort that went into accomplishing this by the Boulder DA's office and the other agencies that were involved. ... It's just beyond impressive what they accomplished."
But Ramsey also added a note of caution.
"Based on what happened to us, I don't think it's proper that we speculate or discuss the case," John Ramsey told KUSA. "It's important that justice be allowed to run its course and do its job."
"We have, in a sense, turned the justice process over to the media," he said. "I think it's gotten out of control."
Pam Paugh, Patsy Ramsey's sister, said, "I don't feel that I need to stand here and say to the world, 'I told you so.' We are a family that has lived on the truth, and the truth as we knew it was that neither John nor Patsy, Burke (JonBenet's older brother) nor any other family member had ever laid a hand on JonBenet." (Watch JonBenet's aunt react to the arrest -- 4:36)
Lacy's office has scheduled a news conference on Thursday.
Suspect's brother: 'Whole thing is ridiculous'
Ramsey attorney Lin Wood of Atlanta said Karr "has some background" in Conyers, Georgia, an Atlanta suburb, and at one point was a schoolteacher.
Karr's father and brother still live in metro Atlanta, in the suburb of Sandy Springs, but were not home Wednesday night. However, Karr's brother, Nate, told CNN: "This whole thing is ridiculous."
Asked by KUSA whether he knew the suspect, John Ramsey said, "I really can't comment on that. To my knowledge, no, I didn't, but I don't know enough yet (to say for sure)."
The Ramseys also lived in the Atlanta area before they moved to Boulder. The day after JonBenet was buried in the Atlanta suburb of Marietta, the Ramseys gave CNN an exclusive interview. "There is a killer on the loose," a tearful Patsy Ramsey said in that interview. "I don't know who it is. I don't know if it is a he or a she, but if I were a resident of Boulder, I would tell my friends to keep your babies close to you. There's someone out there."
Patsy Ramsey was laid to rest beside her daughter in Marietta. On Wednesday, a family friend taped a note to her grave. It read, "Dear Patsy, justice has come for you and John. Rest in peace."
Wood said he regretted "that Patsy's not here to be able to speak to you herself and express her feelings to you. I am confident she would urge the media to refrain from speculating about this individual, despite his arrest."
Speaking of John Ramsey, Wood said: "I know that he feels some sense of relief.
"I know that he feels that this is a major step, potentially, in the final resolution to the case. We may be, and I say may be, one step closer to the final resolution of the case. But again, I would urge that Mr. Karr be given the presumption of innocence."
A statement issued by another Ramsey attorney, Hal Haddon, said: "It is our hope that this arrest will bring some closure to the Ramsey family after a 10-year ordeal."
In 2003, a federal judge dismissed a libel-slander lawsuit against the Ramseys and said evidence suggested an intruder had killed JonBenet. The lawsuit had been filed by a freelance journalist whom the Ramseys had described as a suspect in a book they had written.
The Boulder County District Attorney's Office concurred with the judge's opinion the following month, saying there was little evidence against the couple.
Asked about the worst part of the whole ordeal, John Ramsey said, "The hardest part was losing a child, by far."