Is a panda a closer relative to a bear or a raccoon? This question has perplexed biologists for over a century, and has continued to perplex scientists decades after the case seems to have been, somewhat hopefully, declared closed[ 1].
After much difficulty in detailing panda evolution, it turns out that it depends which panda you are referring to, the giant panda or the red panda . Both of these beautiful creatures can be seen at the National Zoo in Washington D.C. , and they have always been the primary attractions since they have been there. Although both the giant and the red are referred to as pandas, it turns out that they are not particularly close relatives. The two factors that most likely cause them to be referred to as pandas are that they both hail from China and they have similar appearances and feeding behaviors, presumably as a result of what is referred to as convergent evolution. Convergent evolution is when two species that are not particularly closely related develop similar attributes due to the guiding effects of inhabiting a similar environmental niche, and as a result, adapting in similar ways . In the case of the pandas, they are both of the order Carnivora that have evolved and adapted to a diet consisting primarily of bamboo. Although not unique, complete herbivores ( plant eaters ) in the order Carnivora are rare. The order Carnivora is so named because most of it's members are well adapted to hunting and have digestive systems well adapted to a diet consisting of flesh. Among the most universal features of members of the order Carnivora are dental adaptations for tearing flesh and a digestive system oriented toward a diet of flesh. Members of this order have the forward looking eyes of a predator as opposed to the lateral eye position of grazers. Perhaps the panda's combination of herbaceous diet and forward looking eyes is what creates it's special and unique interest to us humans.
The elucidation of the evolutionary relationships of the pandas, perhaps because of both their uniqueness, and their similarity to each other has presented one of the most perplexing problems in evolutionary biology. Although both panda's have been known of by the scientific community for over a hundred years, it took until the mid 1960's for the giant panda to be definitively described as a bear ( member of the family ursidae ), and some time after that until the red panda was definitively classified.
The definitive study for the giant panda seems to have been the one done by D. D. Davis  which can now be found online here. The study contains over 300 pages and details much information that few people wish to know. None the less, it remains a valuable online resource for both students and professionals of comparative biology. The quality of the study inspired Stephen Jay Gould, himself one of the legends of paleontology to label this one the greatest classics in the field. Of particular interest to Gould was the issue of the Panda's thumb. The case of the panda's thumb seems to have so inspired Gould that he gave one of his most memorable group of essays that exact name ( See Gould Reference ).
The issue surrounding the panda's thumb is that it is the sixth digit, not the fifth. The "thumb" is actually a modified carpal, or wrist bone, which maintains it's own muscles and some degree of dexterity. It is used by the giant panda to assist in stripping the leaves of bamboo as it consumes them.
While the panda's thumb itself is a seemingly unique adaptation in biology, it turns out that the red panda also has a thumb. This seems to have been one of the adaptations and characteristics that led to both species being referred to as "pandas" . Likewise, the observation that both panda's have dexterous sixth fingers seemed to imply that they were closely related. It has taken even more research, both genetic and paleontological, to confirm that in fact the thumbs, like other adaptations are the result of convergent evolution. In other words, the thumbs arose independently. Although this had been foreshadowed by genetic studies that indicated that the panda's were not closely related to each other, in 2005 was published that an ancestor to the red panda had been found . The closest relative ( fossil ) of the red panda is simocyon batalleri, which is now also know known to have had a false thumb. Simocyon was clearly a carnivore, as can be derived from skull and dental structures, and used it's false thumb to assist in climbing. The false thumbs of simocyon and the red panda are both longer and more curved, which makes them useful in climbing, but they are also useful for stripping bamboo, for which they have now been adapted in the red panda.
The determination of the the precise relationship of the pandas has not been decisively detailed until relatively recently. Both are of the order Carnivora, The red panda (Ailurus fulgens) is a member of the family ailuridae and the giant panda is a member of the family ursidae. Other members of ursidae, and the giant panda's closest relatives are the brown bear, the American black bear, the polar bear and the sun bear. So then, I think we can correctly call a giant panda a bear, but it radiated, or separated from other members of the family rather early. The most similar bear to the giant panda seems to be the spectacled bear of South America, named such because that species also has distinctive facial markings around the eyes. The spectacled bear is also an herbivore.
Mitochondrial DNA studies are usually the most definitive in determining phylogenetic position, or evolutionary relationships. Some of the first mitochondrial DNA studies of the bears ( family ursidae ) produced inconclusive or conflicting results, possibly because ancestors of current species interbred with each other. Our simple view of evolution, where species are always arranged in a tree, is not always the case, because our more recent, and detailed genetic studies show that it is not unusual for different species to systematically hybridize, or interbreed, in nature. It might even be a necessity in order to overcome barriers to evolution such as chromosome number.
On the other hand, precisely what a red panda is a more difficult question. According to mitochondrial DNA analysis, the red panda's closest relative is the striped skunk. For those who have seen the red panda at the national zoo, it might not be to surprising to find that another close relative of the red panda is the raccoon. In fact, noticeable features of the red panda are a raccoon like mask and a bushy ringed tail. Other close relatives of the red panda and raccoon are the American badger, the wolverine, the river otter and the mink. These other relatives of the red panda are of the family mustelidae, and the red panda is alone in the genus ailuridae.
In one of the more recent genetic studies of carnivorae , it was noted that :
"A novel hypothesis for the position of the red panda was recovered, placing it as branching after Mephitidae and before Mustelidae + Procyonidae. Within Mustelidae, subfamily taxonomic changes are considered.
In other words, it branched out after the skunk family and before the weasels and raccoons.
On the other hand, the taxonomic classification giant panda places it in the same family as the bears, ursidae. Within the bear family, ursidae, as might be predicted,the giant panda was the first bear to radiate, or diverge from the parental population. A diagram has been generated by Pages et. al , and is here . The divergence of the Giant Pandas from the other members of ursidae ( bears ) occured about 5 million years ago. To try to put this into some perspective, it is estimated that the red (lesser) panda diverged from a common ancestor with the bears some 40 million years ago. 
Although studies based upon DNA structure and sequence have been difficult for this family because, evidently, there have been events where family members have interbred with each other, and in fact, many members can still be encouraged to interbreed if maintined together, the Panda has been isolated because it has a different chromosome number, not to mention adaptions do a completely different environmental niche than many of the other bears.
As both panda's radiated from their sister groups rather early, there may be more fossils out there to discover, and other details to be added to this classic evolutionary saga. Hopefully these two living but threatened species will not one day be known only from their fossils.
Many of the members of the bear family, ursidae can interbreed, largely because they have the same chromosome number, 72. The two exceptions are the Panda, with 42 chromosomes and the spectacled bear with 53 chromosomes.
Perhaps an even larger barrier to interbreeding between pandas and other members of the bear family is that they could never agree on a place to meet for dinner. Most members of the bear family would find a meal of bamboo highly unsatisfying, and the relatively clumsy panda would not make a likely partner for an evening of seal hunting with a polar bear. Perhaps a nice blueberry pie ....
Ernst Mayr Nature 323, 769 - 771 (30 October 1986); doi:10.1038/323769a
Uncertainty in science: is the giant panda a bear or a raccoon? abstract
Davis, D. D. (1964). The giant panda: A morphological study of
evolutionary mechanisms. Fieldiana Zool. Mem. 3: 1339.
Gould, Stephen Jay (1978). The panda's peculiar thumb. Natural History 87 (November): 20-30. online here
Gould, Stephen Jay Fuzzy wuzzy was a bear. Andy Panda, too - giant panda related to bear, not raccoon
Discover, Feb, 1986 by Stephen Jay Gould available here
 Zimmer, Cal The Other Panda's Thumb, Discover (2005) Magazine available online here
Evidence of a false thumb in a fossil carnivore clarifies the evolution of pandas
Manuel J. Salesa, Mauricio Antn, Stphane Peigne, and Jorge Morales abstract here
 Tara L. Fulton, Curtis Strobeck
Molecular phylogeny of the Arctoidea (Carnivora): Effect of missing data on supertree and supermatrix analyses of multiple gene data sets
Molecular Phylogenetics and Evolution, Volume 41, Issue 1, October 2006, Pages 165-181 online here
Combined analysis of fourteen nuclear genes refines the Ursidae phylogeny
Molecular Phylogenetics and Evolution, Volume 47, Issue 1, April 2008, Pages 73-83
Marie Pags, Sbastien Calvignac, Catherine Klein, Mathilde Paris, Sandrine Hughes, Catherine Hnni available here