The giant panda's earliest known ancestor was much smaller than its modern-day counterpart, scientists say.
A fossilised skull found in south China revealed the ancient animal, known as Ailuropoda microta, was about half the size of today's giant panda.
However, the "pygmy" bear, which lived about two million years ago, shows strong similarities to modern pandas and also lived on a bamboo diet.
The finding is reported in Proceedings of the National Academy of Sciences.
The skull was uncovered in a limestone cave in China's Guangxi province; it was in a remarkably intact state.
Prior to this discovery, the fossil record of A. microta - the "pigmy giant panda" - was limited to a few isolated teeth and jaw fragments.
Russell Ciochon, an anthropologist at the University of Iowa, US, and an author on the PNAS paper, said: "Pandas have very unique skulls, so to have the whole skull with all of the upper dentition means we can see very much what the animal looked like."
The team deduced that the species, which lived during the late Pliocence Epoch, was significantly smaller than today's giant panda (A. melanoleuca).
The researchers' estimates put A. microta's body length at about 1m (3ft). Its modern counterpart is more than 1.5m-long (5ft).
It seems that pandas have been eating bamboo for a long time
Despite the size difference, the scientists found strong anatomical similarities between the pandas of past and present.
They discovered the pygmy bear had heavy wear patterns on its teeth and defined muscle scars, suggesting it had the very powerful chewing mechanism required for a diet of bamboo shoots.
Professor Ciochon told the BBC News website: "What struck us was it was very much like a miniaturised version of the living giant panda, yet it was over two million years old."
The team does not know if A. microta carried the same distinctive black and white markings as its relative.
The skull of the giant panda's earliest known ancestor also provides more clues into its evolution.
Professor Ciochon said: "Bears are generally carnivorous or omnivorous, and then you have pandas - they have gone in a completely different direction, they are committed vegetarians.
"Early on in the evolutionary history of pandas, they must have invaded this bamboo niche and begun to eat bamboo.
"Given the food source they were eating was very prevalent, then they must have become more and more specialised. It probably has been exploiting this kind of environment for many millions of years."
A. microta is thought to have lived in a moist lowland tropical forest habitat where bamboo was one of the most dominant plant types.
Other creatures that lived in the same area at about the same time were a giant extinct elephant-like creature, Stegodon, and a giant extinct ape Gigantopithecus.
Today, the giant panda lives in the upland bamboo forests of Sichuan. However, half of the panda's mountainous bamboo habitat was lost between 1974 and 1988 and the animal is listed as Endangered on the IUCN Red List of Threatened Species.