The last known resting place of Homo erectus, one of the most successful human ancestors and the first to walk fully upright, has been traced to a floodplain near the longest river on the Indonesian island of Java.

A dozen partial skulls and two shinbones, discovered in a bonebed near the Solo river in the 1930s, but never reliably dated, have now been placed at between 108,000 and 117,000 years old after a comprehensive survey of the site.

The age of the remains marks Central Java as Homo erectus’s final stand, and confirms the species as the longest surviving human ancestor by far, its presence stretching across the evolutionary tree for about 1.8m years.

“This is the largest collection of Homo erectus fossils at a single site in the world and dating it has always been important,” said Russell Ciochon, an anthropologist at the University of Iowa. “This was a very long-lived species and we have now nailed the date of their last appearance.”

Homo erectus racked up a score of firsts. It was the first of our predecessors to have modern human-like body proportions, and may have been the first to cook food. The species emerged in Africa nearly 2m years ago and became the first to leave the continent, spreading across Asia and down into Indonesia. It hung on in Java long after it had vanished elsewhere.

Excavations at Ngandong, Indonesia in 2010. Photograph: Russell Ciochon/Nature

The bones belong to a haul of 25,000 mostly animal fossils that were unearthed by Dutch geologists as they excavated the Ngandong terrace, a floodplain along the Solo, between 1931 and 1933. The bones became lodged in the floodplain after being washed downriver, but how the individuals died is unknown. Scientists have long tried to date the site, but have come up with wildly different estimates from 27,000 to half a million years old.

With staff from the Institute of Technology in Bandung, Indonesia, the research team spent 16 years dating the site with a panoply of modern techniques. Their work was aided by the grandchildren of one of the Dutch geologists, who provided maps and journals that, once translated into English, pointed to the location of the original bonebed.

Writing in the journal Nature, the scientists describe how they worked out the age of the Homo erectus fossils by dating the landscape and new animal fossils excavated from the Ngandong terrace. They dated stalagmites in the caves of nearby mountains to show that the mountains themselves rose up at least half a million years ago and diverted the Solo into the Kendeng hills where the Ngandong terrace sits.

Further dating revealed that the Ngandong terrace itself formed between 140,000 and 92,000 years ago. Finally, the researchers located the original bone bed and dug up hundreds more fossils. None belonged to Homo erectus, but rather a smattering of animals from the Ngandong tiger to water buffalo and elephants.

An exposed bonebed at Ngandong. Photograph: Russell L. Ciochon Univ. of Iowa/Nature

The work produced 52 new dates for the different parts of the site, which Richard Bailey, a researcher at Oxford, fed into a computer model. This weighted the dates according to the uncertainties of the different techniques and came up with a final age range for the fossils.

“Knowing when a species was alive and when they eventually died out is important for understanding where they sit in the evolutionary tree, who they interacted with, and why they became extinct,” said Kira Westaway, who co-led the study at Macquarie University in Sydney.

Given the age of the remains, Homo erectus did not overlap with Homo sapiens. But the prehistoric species may have mingled with the enigmatic Denisovans, an early human known from the cold caves of Siberia, which may have reached south-east Asia.

The dating shows that Homo erectus finally went extinct on Java when the environment grew warmer and the woodland was replaced by rainforest.

Josephine Joordens, a paleoecologist at the Naturalis Biodiversity Center in Leiden, said it was an “impressive” piece of work. “It’s an important result because it nails down the time span of this highly successful, cosmopolitan and long-lasting species,” she said.

Mark Maslin, a researcher at UCL, said: “Even more exciting is the realisation that around 100,000 years ago, there existed at least seven or eight different hominin species including our own, Homo sapiens. From this complex bush of ancestors only one species emerged, our own, which finally arrived in Java 35,000 years after the last known appearance of Homo erectus.”

But John Hawks, an anthropologist at the University of Wisconsin-Madison, raised doubts about the identity of the fossils. “The question I’m asking is why should we think that these fossils are Homo erectus?” he said. “It’s hard for me to see a population of fossils from Java 120,000 years ago and not assume they were probably Denisovan.”