The fossilised remains of a bizarre, ancient bird that had middle toes longer than its lower legs have been found in a lump of amber from Myanmar.

The elongated toe resembles those seen on lemurs and tree-climbing lizards, and suggests an unusual lifestyle for some of the earliest birds that lived alongside the dinosaurs, researchers said.

“We have the leg of a little 99-million-year-old bird, preserved in amber, that shows a foot morphology unlike any known previously,” said Jingmai O’Connor, a vertebrate palaeontologist and co-author of the study at the Chinese Academy of Sciences.

The foot was so distinctive that O’Connor and her team declared the bird, which was probably about the size of a sparrow, a new species, naming it Elektorornis chenguangi. The first part of the name translates to “amber bird”. It is the first bird species to be recognised from amber.

The bird’s foot had four toes, with the third measuring 20% longer than the bird’s lower leg bone, and 41% longer than its second toe.

Scientists compared the bird to the only other known species that has such disproportionately long digits: the aye-aye, a type of lemur which uses its elongated fingers to pry larvae and insects out of tree trunks. The researchers believe that Elektorornis might have used its toes for similar purposes.

The bird might have spent most of its time in trees rather than in water or on the ground, the team speculate, developing its longer toes to cling to branches more easily, as seen in tree-climbing lizards.

Along with its unusually long toes, the bird is thought to have sported teeth, and claws on its wings, and it may havehad primitive feathers. It lived in a mangrove forest by the sea, alongside lizards, snakes and frogs.

The bird’s leg, discovered in a lump of amber from the Hukawng valley in Myanmar in 2014, was originally thought by traders to belong to a lizard, but O’Connor’s team swiftly identified it as an ancient bird’s foot.

The study of the remains, published in the journal Current Biology, involved CT-scanning the amber to produce a 3D reconstruction of the foot. The model was compared with 20 other extinct bird species and 62 extant ones to fully establish its unique form.

O’Connor said the fossil illustrates the “weird” lifestyle and anatomy of early birds, with the foot only the latest in a flurry of ancient animal remains found in Myanmar amber. Last year another team of scientists found the remains of an ancient proto-spider encased in amber. The spider had a tail twice as long as its body, which might have been swished from side to side to detect predators.

The Chinese team now hope to study proteins and pigments in feathers found on the surface of the amber in the hope of better understanding how the bird was adapted to its environment, for example by using its feathers for camouflage.

Daniel Field, a vertebrate palaeontologist at the University of Cambridge, who was not involved in the study, said: “The bizarre proportions of the foot of Elektorornis emphasise how unpredictable the evolutionary history of birds has been.” He described the fossil as extremely well preserved. Without these fossils, “we would never have direct evidence of the fanciful deep evolutionary history of birds”, he said.