The ancestors of the pants you’re wearing today could include ancient Peruvian dyeing techniques, scientists say, after the discovery of a 6,200-year-old piece of indigo dyed fabric.

Archaeologists discovered the ancient cloth samples during the 2009 excavation of a Peruvian ceremonial mound known as Huaca Prieta. After dating the dyed cotton scraps, researchers discovered that their samples were at least 1,800 years older than the next-oldest instances of indigo dye use, found in Egypt.

"The cotton used in Huaca Prieta fabrics, Gossypium barbadense, is the same species grown today known as Egyptian cotton," the study's lead author, Jeffrey Splitstoser, said in a press release. "And that's not the only cotton connection we made in this excavation – we may well not have had blue jeans if it weren't for the ancient South Americans."

Peru is famous for its cotton – in fact, a particularly hardy cotton was domesticated at an undetermined site in Peru, likely along the northwest coast. The country's modern-day cotton is practically insect-resistant, and often grown without insecticides or fertilizers.

The cloth scraps at Huaca Prieta were found sandwiched in-between layers of a ramp that led up to the temple. Originally, their blue coloring was hidden from archaeology workers, because of the sooty material used to build the temple, as Dr. Splitstoser, an anthropologist at The George Washington University, told LiveScience.

After gently washing the cloth and using a technique called high-performance liquid chromatography, however, researchers discovered that they were holding the oldest indigo-dyed fabric in the world.

Five of the eight samples that researchers put through testing procedures were confirmed to contain traces of indigo. The remaining three samples may have been degraded over time.

Traditional indigo dye comes from an organic compound called indigoid, generally found in plants such as the plant Indigofera, the likely source of the Huaca Prieta indigo dye. Ancient Egyptians, however, extracted their indigo coloring from sea snails. Today, the dye used for the ubiquitous blue jean is usually produced synthetically.

While the researchers knew that blue dyes were used in the Americas at least 2,500 years ago, and that Egyptians had been using indigo for at least 4,400 years (prior to this discovery, the oldest scrap of indigo dyed cloth was an Egyptian sample from about 2,400 BC), the Huaca Prieta samples prove that the great-great-grandfather of blue jeans might actually have first been created by our neighbors to the south.

"The people of the Americas were making scientific and technological contributions as early and in this case even earlier than people were in other parts of the world," Splitstoser told LiveScience. "We always leave them out. I think this finding just shows that that's a mistake."

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

"Many people … remain mostly unaware of the important technological contributions made by Native Americans, perhaps because so many of these technologies were replaced by European systems during the conquest," he said in the press release.

The study was published this week in the journal Science Advances.