The Tagus (Spanish: Tajo[ˈtaxo]; Portuguese: Tejo[ˈtɛʒu]; Latin: Tagus; Ancient Greek: Τάγος Tagos) is the longest river on the Iberian Peninsula. It is 1,038 km (645 mi) long, 716 km (445 mi) in Spain, 47 km (29 mi) along the border between Portugal and Spain and 275 km (171 mi) in Portugal, where it empties into the Atlantic Ocean near Lisbon. It drains an area of 80,100 square kilometers (30,927 sq mi) (the second largest in the Iberian peninsula after the Douro). The Tagus is highly utilized for most of its course. Several dams and diversions supply drinking water to most of central Spain, including Madrid, and Portugal, while dozens of hydroelectric stations create power. Between dams it follows a very constricted course, but after Almourol it enters a vast alluvial valley prone to flooding. At its mouth is a large estuary on which the port city of Lisbon is situated.