The discovery marks the earliest use of indigo as a dye, a technically challenging colour to produce, researchers said.
According to Jeffrey Splitstoser from George Washington University in the US, the finding points towards the sophisticated textile technology ancient Andean people developed 6,200 years ago.
"Some of the world's most significant technological achievements were developed first in the New World," said Splitstoser.
"Many people, however, 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.
More From This Section
The textile was discovered during a 2009 excavation at Huaca Prieta, a desert area that offers nearly pristine archaeological preservation on the north coast of Peru.
Experts believe the site was likely a temple where a variety of textiles and other offerings were placed, possibly as part of a ritual.
The well-preserved artifacts give a glimpse into ancient civilisation and lifestyle and offer an unexpected connection to the 21st century, researchers said.
The development of indigo dye was critical for future trends in fashion, fabrics and textile arts, Splitstoser said.
"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," he said.
The research was published in the journal Science Advances.