The Tagus River is the longest river on the Iberian Peninsula. It is 645 miles long; it runs in Spain for 445 miles. It runs for 29 miles along the border between Portugal and Spain. Then in Portugal, it goes on for 171 miles where it empties into the Atlantic Ocean near Lisbon. It drains an area of 30,927 square miles (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, Portugal (a hilly capital city) is laboriously situated.

More Info: en.wikipedia.org