The Tagus is the longest river in the Iberian Peninsula. The river rises in the Montes Universales between Cuenca and Teruel, in mid-eastern Spain, flows 1,007 km (626 mi), generally westward, and empties into the Atlantic Ocean at Lisbon.