South America's winding Amazon River flows in an easterly direction across the continent, dumping water into the Atlantic Ocean.

But in eons past, it flowed from east-to-west and, for a time, in both directions at once, a new study finds.

About 100 million years ago, during the middle of the Cretaceous Period when dinosaurs still walked the Earth, the continents of South America and Africa broke apart.

• Click here to visit FOXNews.com's Natural Science Center.

The fissure created a raised highland along the east coast of South America, which tilted the Amazon's flow, sending water and sediment rushing toward the center of the continent.

Over time, South America developed a vertical crease along its middle, a small mountain range called the Purus Arch.

The ridge divided the Amazon's flow, sending one side of the river eastward toward the Atlantic Ocean and the other side westward toward the still-growing Andes Mountains.

Toward the end of the Cretaceous, the growing Andes became large enough to send the Amazon's water tumbling back toward the Purus Arch.

Eventually, sediments eroded from the Andes filled in the Amazon basin between the mountains and the Arch.

Water breached the Arch and flowed unobstructed eastward. By this time, the eastern highland had eroded away, and the river's water could empty freely into the Atlantic.

The discovery of the Amazon's reverse flow in ancient times was accidental.

Scientists were studying rocks in the river to determine the speed at which sediment is ferried toward the Atlantic when they stumbled upon ancient mineral grains in the central part of South America.

Chemical analysis revealed the grains could only have originated in the now-eroded highlands on the eastern part of the continent.

The new finding helps illustrate the transient nature of Earth's surface, the researchers said.

"Although the Amazon seems permanent and unchanging, it has actually gone through three different stages of drainage since the mid-Cretaceous, a short period of time geologically speaking," said study team member Russell Mapes, a graduate student at the University of North Carolina at Chapel Hill.

Previous studies showed certain segments of the Amazon flowed backward in times past, but the current research, presented Wednesday at the annual meeting of the Geological Society of America in Philadelphia, is the first to reveal a continent-wide shift in the river's movements.

Also involved in the research were UNC geologist Drew Coleman and Brazilian scientists Afonso Nogueira and Angela Maria Leguizamon Vega of the Universidade Federal do Amazonas.

The Amazon is the second-longest river in the world, after the Nile River in Egypt.

About 4,000 miles long, the Amazon is the equivalent of the distance from New York City to Rome.

Copyright © 2006 Imaginova Corp. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.