One of the biggest questions in human evolution is why hominids evolved upright, two-legged walking, or bipedalism. It seems to be the key trait that separated the earliest hominids from their ape cousins. New research on how wild chimpanzees walk suggests our ancestors took their first bipedal steps to free their arms and hands to carry valuable resources.

The idea that bipedalism evolved to free up the hands is not a new idea—it can be traced back to Charles Darwin. But it’s a difficult hypothesis to test with the fossil record. So a team of researchers—including Brian Richmond of the Smithsonian’s Human Origins Program—turned to chimpanzees. Many anthropologists think hominids probably evolved from an ape that was quite similar to chimps, making them good test subjects for theories related to early hominid evolution.

In the new study, published in the journal Current Biology, the researchers traveled to the Republic of Guinea in West Africa and provided piles of oil palm and coula nuts to 11 chimpanzees in a forest clearing. The chimps preferred the coula nut, which was rare in the area compared to the abundant oil palm nut. When coula nuts were provided, the chimps were four times more likely to pick up the nuts and walk away on two legs. In addition, the chimps could carry twice as many nuts while walking bipedally as when walking on all fours. The team concluded that the chimps brought the prized nuts to another location to avoid competition with other chimps—and walking bipedally was the best way to do it. To further support their findings, the team also watched crop-raiding chimps, which often ran away on two legs after stealing papayas and other cultivated plants. (You can watch a chimp in action here.)

How does this behavior relate to early hominids? If our ancestors frequently found themselves in similar situations—coming across valuable and unpredictable foods that might not be widely available—then early hominids would have benefited from collecting the precious commodities and transporting them away from the source and other hungry competitors. In turn, the team wrote, “this could reward higher frequencies and/or longer distances of bipedal bouts of carriage, creating a selection pressure for more economical bipedality.”

This is not the first time anthropologists have studied chimpanzees to gain insight on the origins of upright walking. In 2007, a team led by Herman Pontzer, now at the City University of New York, examined the energetics of captive chimpanzees walking on two legs versus four. Human walking was 75 percent less costly, as measured in oxygen consumption, than chimp walking—regardless of whether a chimp walked upright on two legs or knuckle-walked on all four, the researchers reported in Proceedings of the National Academy of Sciences. However, with only slight increases in leg length and hip extension, a knuckle-walker would save more energy if it walked upright. Such energy savings might have led to the evolution of bipedalism in hominids, the researchers suggested, as Africa became cooler and drier during the Miocene. As forests shrank, two-legged walking would have been the most efficient way to travel between isolated patches of food.

There is one sticking point with such chimp studies, however: Not all anthropologists agree that the ancestor of hominids resembled chimpanzees. In 2009, an international team of researchers published 11 papers outlining the anatomy, habitat and behavior of Ardipithecus ramidus, an early hominid that lived in East Africa 4.4 million years ago. Based on the features of the species’ hands, feet and lower back, the team concluded in Science that hominids could not have evolved from a knuckle-walker. Instead, they must have descended from an ancestor with a more monkey-like body plan. Therefore, they suggested, knuckle-walking chimps are not good models of the evolution of hominid bipedalism.

Of course, not all anthropologists agree with this interpretation of Ardipithecus. So the question of chimps’ value as models of early hominids remains open—as do questions surrounding the origins of our ancestors’ upright walking.