Calling a person a pack rat may be considered an insult to most, bringing to mind scenes of hoarders navigating piles of ephemera and what most would call trash. In the scientific community, however, literal pack rats and other rodents play an important role in preserving history. The materials that rats collect and store in their nests, from naturally occurring items like sticks and seeds to human creations like trinkets and tchotchkes, are a treasure trove for scientists and historians alike.

Paleobotanists and climatologists have studied the ecosystems of the past by analyzing millennia-old material in rat nests, tracking ice age climates and changing flora across the American Southwest. In centuries-old homes of the antebellum South, objects preserved in rats’ nests have even taught us new things about the lives of enslaved African Americans whose stories were not preserved in the written records of the time.

Pack rats, also known as wood rats, are notorious for collecting an odd assortment of items from their surroundings to make their nests, called middens. Although pack rats are similarly sized to their city-dwelling brown and black rat cousins, they have bushy (not hairless) tails and belong to the genus Neotoma rather than Rattus. These stockpiling rodents tend to only range 100 to 150 feet from their middens, collecting items from about a 50-foot radius. Pack rats will gather everything from plants and branches to insects and bones, which they pack into their middens. While you might not expect such materials to survive for very long, pack rats also have a special trick to conserve their haul: urine.

Pack rats pee all over their nests, and in arid climates (like deserts), the urine crystallizes as it dries. This preserves the items inside the middens, but it also presents a challenge to scientists studying the finds. “They have very highly concentrated urine, and once it crystallizes, it’s rock hard,” says Buffalo State College ecologist Camille Holmgren. “In order to collect middens, we often need a rock hammer and a big flooring chisel to hammer away at these things because they’re often cemented to the rocks.”

Holmgren’s research on vegetation and climate change involves collecting amberat, the ancient pee-hardened middens of pack rats, which she has to soak for at least a week to break down the urine and extract leaves, seeds and twigs from an ancient world. Once the amberat disintegrates, Holmgren and fellow scientists can carbon date the plants inside these natural time capsules. Scientists have found specimens up to 50,000 years old—about the limit of carbon dating, which becomes unreliable beyond that amount of time.

Holmgren identifies plant species preserved in amberat from the American Southwest and compares the ancient flora with modern plants in the region to understand how vegetation patterns have changed across tens of thousands of years. By comparing the past and present ecosystems, Holmgren can study localized climate change.

Biologist Robert Harbert at Stonehill College in Massachusetts also studies pack rat middens to learn about past climates, including from the last ice age some 25,000 years ago. Unlike studying ancient pollen or other methods of exploring our planet’s history, Harbert says “the materials in the pack rat middens are so well preserved that you can be way more specific with what species of plants.” Scientists can estimate rainfall, temperature and other conditions of ancient climates based on the kinds of plants they find in amberat. Harbert and other researchers have also used amberat to study rodent evolution, local extinctions, and migration patterns of plants and animals. Amberat also played a key role in the discovery that Ancestral Pueblo populations used up the local timber supplies for construction and fuel in Chaco Canyon, leading to the abandonment of the cultural center that rose to prominence more than a thousand years ago in what is now New Mexico.

Pack rats, as well as their cousins the black and brown rats, don’t just collect sticks and seeds. When rats live near humans, they tend to abscond with anything shiny or unique they can find. On the Atlantic coast of the U.S., rats preserve their treasures behind makeshift walls rather than through fossilization because the climate is not dry enough to form amberat. Thanks to these little hoarders, historians have learned new details about the lives of the enslaved workers across the southeastern United States, including in the Nathaniel Russell house.

Nathaniel Russell was an antebellum-era shipping merchant and slave trader whose 1808 Charleston, South Carolina, house has been designated a National Historical Landmark since 1973. Conservators working at the house acknowledge that their understanding of the estate’s residents is incomplete.

“We had visited the Nathaniel Russell house a couple of times trying to see the house and the site through different perspectives,” says Rucha Kamath, an architectural preservation researcher and graduate of Clemson University and the College of Charleston. “One was through understanding the African Americans who lived there.”

Although the main three-story mansion was protected and restored starting in 1989 by the Historic Charleston Foundation, the kitchen house wasn’t considered for restoration until 2017. “The kitchen house, which would have been the working and living spaces for enslaved people, was really just sort of relegated to a storage and office area,” says Lauren Northup, the director of museums at the Historic Charleston Foundation. “That isn’t really honoring those people’s lives or their contribution to the antebellum landscape of Charleston.”

Northup’s office was located in the old kitchen house, and one day she found herself staring at a door that appeared rather old. She called on University of Delaware art conservator Susan Buck to come take a look, and the researchers realized that much of the original woodwork in that part of the house was still intact. Buck and a team of conservation experts cut holes in the drywall to search for original plaster and baseboards. The team was thrilled to find multiple rat middens hidden in the wall.

Among the mass of organic matter, they found sewing pins, buttons, marbles, part of a uniform waistcoat, and even fragments of printed paper that could be dated to November 1833. The paper was darkened and curled but still legible once it was gently opened.

“It was protected from rain and moisture, and even though it’s sooty, it didn’t burn,” Buck says. “So we just have all these fragile materials that normally wouldn’t survive.” Among the material, the team recovered scraps of an early writing primer, suggesting some of the enslaved workers living in the kitchen house has been learning to read and write.

To move beyond the written record, historians and conservators have looked for new clues in unlikely places. Common rats that surely plagued the occupants of the kitchen house on Nathaniel Russell’s estate have left behind an invaluable cache of items that reveal new details about the lives of people who are too frequently absent in the historical record.

“When you open up a rat’s nest, it’s completely unexpected. You just can’t be prepared for it,” Kamath says. “Sometimes you come across nothing; sometimes you come across a whole treasure chest.”