Andalusia has rivers that flow into both the Atlantic and the Mediterranean. Flowing to the Atlantic are the Guadiana, Odiel-Tinto, Guadalquivir, Guadalete, and Barbate. Flowing to the Mediterranean are the Guadiaro, Guadalhorce, Guadalmedina, Guadalfeo, Andarax (also known as the Almería) and Almanzora. Of these, the Guadalquivir is the longest in Andalusia and fifth longest on the Iberian peninsula, at 657 kilometres (408 mi).
The rivers of the Atlantic basin are characteristically long, run through mostly flat terrain, and have broad river valleys. As a result, at their mouths are estuaries and wetlands, such as the marshes of Doñana in the delta of the Guadalquivir, and wetlands of the Odiel. In contrast, the rivers of the Mediterranean Basin are shorter, more seasonal, and make a precipitous descent from the mountains of the Baetic Cordillera. Their estuaries are small, and their valleys are less suitable for agriculture. Also, being in the rain shadow of the Baetic Cordillera means that they receive a lesser volume of water.
The following hydrographic basins can be distinguished in Andalusia. On the Atlantic side are the Guadalquivir basin; the Andalusian Atlantic Basin with the sub-basins Guadalete-Barbate and Tinto-Odiel; and the Guadiana basin. On the Mediterranean side is the Andalusian Mediterranean Basin and the upper portion of the basin of the Segura.