With a length of 2914 kilometers , it is the longest river that runs entirely in Brazilian territory, and the fourth longest in South America and overall in Brazil (after the Amazon, the Paraná and the Madeira).