The longest river in the world, measured from its mouth to its most distant, year-round source, is likely the Amazon, which flows 4,345 miles from the Peruvian Andes through Brazil to the Atlantic Ocean.

However, much depends on how you measure it.

Until 2007, the title belonged to the Nile, which runs 4,258 miles from the mountains of Burundi to its famed and fertile delta fan, where Egypt meets the Mediterranean Sea. The two lengths are close enough that measuring techniques and philosophies can be quite controversial. In fact, the geographers who crowned the Amazon champion were funded in part by the Brazilian government.

The Ancient Egyptians were familiar with the Nile as far upstream as today’s Khartoum, Sudan, some 1,700 miles from the river’s mouth. In A.D. 150 Ptolemy, the famed Greek geographer living in Roman Egypt, wrote that the river originated in the “Mountains of the Moon” deep in the African interior. In 1862 English explorer John Hanning Speke journeyed from Africa’s east coast to find what he considered to be the source, where the river exits Lake Victoria in present-day Uganda.

Geographers did not explore the Amazon’s most distant sources until the mid-20th century, and it was only with the advent of GPS technologies that ever-more accurate estimates, like the 2007 survey, were made possible. Great rivers change course over the seasons and the years, making it difficult to determine which measurement comprises its accurate length. As the crow flies, it is about 2,400 miles from the Nile’s source to its outlet (the meandering Amazon covers a mere 1,100 miles of straight-line distance).