It’s the unsolved murder that has gripped the world for 22 years. Who killed JonBenet Ramsey?

Now we may be one step closer to finding out, after a longtime suspect in the case has reportedly confessed to killing the six-year-old beauty pageant princess, who was found dead in her basement on December 26, 1996.

Letters written by convicted paedophile Gary Oliva in jail have been obtained by theDaily Mail, and they reportedly claim the 54-year-old is taking full responsibility for the crime, saying he killed her by accident.

“I never loved anyone like I did JonBenet and yet I let her slip and her head bashed in half and I watched her die,” he allegedly wrote. “It was an accident. Please believe me. She was not like the other kids.”

The child sex offender, who is serving time in a Colorado prison for child porn charges, reportedly goes on to explain how much the she “changed” him in a second letter — revealing her death induced remorse in him.

“JonBenet completely changed me and removed all evil from me,” Oliva claimed. “Just one look at her beautiful face, her glowing beautiful skin, and her divine God-body, I realised I was wrong to kill other kids. Yet by accident she died and it was my fault.”

The sensational letters were sent to music publicist Michael Vail, a former school mate of Oliva’s, who has reportedly suspected his involvement in the crime for years.

The shock admission is one of the biggest breakthroughs in the now infamous case, which has stumped detectives for years.

“My suspicions began when Gary called me late at night on December 26, 1996. He was sobbing and said, ‘I hurt a little girl’,” the 55-year-old told the publication.

The next day he saw a newspaper headline about a ‘slain girl’ in Boulder, Colorado, sparking his long held suspicions around his former friend.

Oliva, who has a history of sexually abusing minors, lived just a few blocks from the Ramseys at the time of the murder.

He was questioned four years after her death after being arrested on unrelated charges, but Boulder police cleared him, the Denver Post reported in 2016 when he was arrested over the discovery of sexually explicit images of children found on an email account he owned.

The report detailed how in 2002, while Oliva was in Boulder jail over a parole violation, he gave a jailhouse interview in which he said he was being “persecuted” over the JonBenet case because of his history of pedophilia.

“JonBenet’s murder touched me very deeply,” Oliva told The Post. “I feel she was an exceptional girl whose death was an exceptional loss. I felt the need to build a monument, a shrine, to remember this little girl.”

He told police this was the reason why he had a photo of JonBenet in his backpack, when arrested on a drug charge in December 2000.

During the many twists and turns in this investigation, police prosecutors cleared JonBenet’s parents Patsy and John, along with her brother Burke, in 2008 after assessing DNA evidence.

But the district attorney overseeing the case said it was premature to exonerate the Ramseys and ordered additional tests using new DNA testing technology that authorities hope will further the investigation.

Police collected and studied thousands of pieces of evidence, and the case remains open.

However in 2013, ABC News reported a grand jury believed there was enough evidence in 1999 to indict John and Patsy Ramsey on charges relating to the unsolved killing of the young beauty queen.

In 2016, a documentary called The Case of JonBenet Ramsey aired ahead of the 20th anniversary of JonBenet’s death, which ultimately accused Burke — who was nine at the time — of bludgeoning his sister to death.

As a result, Burke launched a $750 million ($A1.05 billion) defamation lawsuit against American TV network CBS which was settled at the start of this year, according to the New York Post.

It was the second lawsuit the 31-year-old filed against the TV network.

Not long after the damning doco aired, Burke went on US talk show Dr Phil to deny any involvement in her death.

“Did you do anything to harm your sister JonBenet,” Dr Phil McGraw asked, point blank.

“No,” Mr Ramsey responded.

“Did you murder your sister JonBenet,” he pushed.

“No,” her brother answered.

During the three-part show, which aired in September 2016, Burke revealed who he suspected of brutally murdering his little sister, who was strangled and left with a lengthy ransom note.

“I kinda always thought it was a paedophile who saw her in one of the pageants and snuck in (to our house), who knows,” he told Dr Phil.

His suspicions are eerily close to the alleged written confession of Oliva, who the Daily Mail reports are now aware of the development in the case.

In a statement issued to the publication they said they had passed the additional information provided to them onto the relevant investigators.

The statement in full reads: “The Boulder Police Department is aware of and has investigated Mr Oliva's potential involvement in this case.

“We have passed the additional information provided onto investigators. We will not comment on any actions or the status of this investigation.”

To date, no one has ever been charged with JonBenet’s death since she was discovered dead by her father on Boxing Day in the family home.

Continue the conversation @RebekahScanlan | rebekah.scanlan@news.com.au