One hundred and thirty-eight years ago today, Australia's most notorious outlaw was shuffled to the first-floor gallows of what is now the Old Melbourne Gaol. Ned Kelly knew his fate — he had taken the lives of three police officers, and now the authorities would take his.

Watch new episodes of The Twist

But, more than a century since that day in 1880, a curious mystery remains unsolved — what happened to Kelly's head?

It's a question that has puzzled scientists and historians for decades, and the story of what happened to the bushranger's remains after his death is as fascinating as the story of his life on Earth.

The 'free-for-all' at Ned Kelly's resting place

After he was executed, Kelly was buried alongside 40 or so other prisoners in a narrow graveyard, their initials etched into the wall above each plot. For Edward "Ned" Kelly, "EK" would be a reminder for all of his fate.

In April 1929, after the closure of the Old Melbourne Gaol, part of the site was being developed for the new Melbourne police headquarters. Contractor Harry Lee signed up for what he thought would be a relatively simple job.

When he arrived on site, however, he noticed the initials carved in the wall and was told they marked the graves of some of the old prisoners — including Kelly's.

Ned Kelly ( Charles Nettleton, State Library of Victoria )

Lee was assured there weren't any actual skeletons down there, just old rotting coffins, probably filled with dirt. No bones. Because, as was common practice at the time, coffins were packed with quicklime — a white, powdered chemical compound.

Tried and tested, quicklime had been used as far back as Roman times and during the plague was caked over corpses as a handy tool in speeding up decomposition, preventing odours and, apparently, disintegrating bones. So, it was assumed any skeletal remains would be completely gone.

The 1929 dig at Melbourne gaol revealed prisoners' remains and became a 'free-for-all' ( Supplied )

But that wasn't the case.

According to Lee's grandson, Lee Franklin, when his grandfather and the foreman on site began to dig the area thought to be where Kelly was buried, bones tumbled out of the coffin.

Crowds of people swarmed from all directions, grabbing whatever they could get a hold of. Lee jumped down, retrieving the skull before anyone else could run away with it.

The whole scene was described as a "free-for-all", with souvenir bones making their way to homes all across Melbourne.

Disgraced at what had unfolded, the premier of Victoria ordered an investigation into this "public horror". A plea was made to the public to return all remains taken from the site, and an undertaker began putting returned remains in new coffins and boxes for reburial.

The new burial site was the grounds of Pentridge Prison out in Coburg and the remains of the prisoners, including Kelly, were transferred and put into two mass graves.

The skull had made its way back to the gaol but, instead of being reburied, it was kept around.

After all, it was believed to be Kelly's and had become quite the talking point. Some say it was kept on a detective's desk before being donated in 1931 to the newly established Australian Institute of Anatomy in Canberra where it came in and out of display for 40 years.

Then, in the 1970s, the skull was given back to the National Trust's Old Melbourne Gaol. School groups and tourists would line the freezing, bluestone walls just to catch a glimpse of Kelly's head in a purpose-built glass cabinet.

The skull believed to be Ned Kelly's before it was removed in 1978 ( Supplied )

The display thrilled curious onlookers, but in 1978 the skull went missing from its cabinet in the old Melbourne Gaol.

Eventually it came into the possession of a Ned Kelly enthusiast called Tom Baxter, who became its unlikely custodian for decades. Baxter kept the skull in a Tupperware container in a hollow log at the bottom of his remote farm in the WA Kimberley.

The skull makes a comeback

Over the years, the journey of Kelly's remains involved many red herrings and rabbit holes for investigators.

According to Jeremy Smith, Heritage Victoria's principal archaeologist, Kelly's remains were likely moved up to four times after the day he was first buried.

In 2008, Mr Smith and fellow archaeologist Catherine Tucker found themselves nine kilometres away at Coburg's Pentridge Prison. They were searching for the mass graves of dozens of prisoners moved there 80 years earlier from the Old Melbourne Gaol.

Smith, Tucker and their team realised no-one actually knew where these mass graves were.

"This is the value of archaeology," Mr Smith explained.

"You can have the historical evidence, you can have people tell you things but that is susceptible to inaccuracy or even intentional bias. When you dig a hole and you find something, well, then you know. This is where the remains are … it's undisputable."

Archaeologists Jeremy Smith and Catherine Tucker ( Anna Priestland )

Because of extensive construction on the Pentridge property, ground-penetrating radar (GPR) would not be helpful in locating the graves. GPR is only really useful on relatively undisturbed earth. So, the team were forced to go by sight, scraping away the dirt inch by inch in search of any sign.

On a rainy Friday afternoon in 2009, the team finally hit something below the surface. Three distinct areas of white substance, standing out against the black clay. They then uncovered the timber boxes and coffins all covered with white, hardened quicklime.

The burial pit at Pentridge Prison ( Heritage Victoria )

More than 40 partial and complete skeletons made their way across Melbourne to the Victorian Institute of Forensic Medicine (VIFM) to be examined and possibly identified. Crudely buried more than once, there was a high chance that DNA had degraded and results would be limited.

With public interest high, the custodian of the skull, Tom Baxter, came out and agreed that, if Kelly's remains were positively identified, he would return the skull so it could be reunited with the rest of the bones. On November 11 2009, on the anniversary of Kelly's death, Baxter handed the skull over to the forensics team. He never doubted for one moment the skull he had was Kelly's.

Then began a 20-month journey of identification by a team led by VIFM's molecular biologist and DNA manager, Dadna Hartman.

Victorian Institute of Forensic Medicine's molecular biologist and DNA Manager Dr Dadna Hartman ( Anna Priestland )

The skull proved difficult to match with bones from the mass graves. After 30 years in a swampy log, attempts to recover DNA from the skull proved fruitless. Also the team had established that the bone structure closely matched another prisoner called Frederick Deeming.

In a stroke of luck, a tooth was brought into the lab by local Melbourne man Chris Ott. His grandfather had worked for the 1929 contractor Harry Lee and, in a strange twist, the tooth fitted perfectly into the skull. This find proved definitively that the skull from Baxter was the one taken from the grave back then, but there was still no proof it was Ned Kelly's.

One thing the tooth had which the skull didn't was DNA. Buried deep inside the tooth, Hartman was able to retrieve mitochondrial DNA.

The discovery meant the scientists now needed to find one of Kelly's living relatives. Luckily, Leigh Oliver, Kelly's great-grandnephew, was able to have his DNA tested against the tooth.

It wasn't a match.

The skull Tom Baxter took in 1978 ( Victorian Institute of Forensic Medicine )

After all those years, it was clear that the skull — once exhibited at the Gaol museum and traipsed all across the country and celebrated as Kelly's — was never his to begin with.

"It was good to be able to put an answer to that question," Dr Hartman said. "Was it Ned's skull? No, but … where is is it? Where is Ned's skull?"

Kelly's skeleton emerges

In 2011, almost three years after Ms Tucker and Mr Smith's archaeological team began the search for the prisoners' remains, VIFM announced they had finally identified a near-complete skeleton as Kelly's.

After a mind-boggling series of CT scans, X-rays, anthropological testing and historical research, the team sought further expertise for obtaining DNA. The world-renowned Argentine Forensic Anthropology Team, experts in the DNA testing of co-mingled, degraded and ancient remains, took up the challenge.

With their assistance, Kelly's remains were identified from an almost complete skeleton found at the Pentridge site by the archaeologists.

A few of the bushranger's bones showed clear evidence of the injuries he received during the Kelly Gang's 1880 Glenrowan shootout, including the infamous gunshot wounds to the left arm and right foot.

It was then, during an examination in VIFM'S forensics lab, that members of the team looked on as two metal gunshot pellets rolled out of a round hole in his right tibia and onto the table. It had been in his leg from the day he was shot.

A bullet hole was found in Ned Kelly's right tibia bone ( Victorian Institute of Forensic Medicine )

As the task of identifying Australia's most famous bushranger was nearing its end, it had become clear who the skull might have belonged to — another prisoner. That man's skeleton, although pieced back together, was never able to be matched to a name. His DNA remains on file in the hope that one day a family member might come forward to claim him.

There is still no sign of Kelly's head, but there is a clue as to how the story might end. In the small box that contained Kelly's remains, one piece of the back of his skull was found, likely to have been removed during a routine autopsy.

So, the search is still on for a perfect match — a skull with a piece missing. The final twist in a mystery that has lasted 138 years.

The Twist is an animated short form documentary series that brings to life some of Australia's most intriguing true crime stories. Five brand new episodes are available now.