Portugal is a country in southwestern Europe that is surrounded by Spain to the north and east and by the Atlantic Ocean to the west and south. Portugal also controls the Atlantic archipelagos of Azores and Madeira. Mountain ranges run through northern Portugal, while hills and plains mark the center and the south. Because of its long coast and many islands, Portugal possesses the third largest exclusive economic zone in the European Union. Some of the longest rivers on the Iberian Peninsula, including the Douro and the Tagus, also enter the ocean in Portugal after flowing from east to west. These rivers have traditionally contributed to the prosperity of some of Portugal’s main cities, including Lisbon (the capital) and Porto (the second largest city). Portugal’s position on the Atlantic has made the country a nation of sailors and explorers. It became a global empire starting in the late 15th century, establishing colonies and trading posts in places as diverse as South America, Africa, the Middle East, India and South Asia. While Portugal eventually lost control of all its colonies, it retains close economic and cultural ties with many of them, including Brazil and Angola. The country's rivalry with neighboring Spain, another colonial power, has ultimately fostered close ties between Lisbon and London. Portugal entered a period of political turbulence and economic decline in the early 19th century. The country languished under a military dictatorship during a significant portion of the 20th century, only transitioning to democracy in 1974. The country subsequently joined the European Economic Community, the Schengen area and the eurozone. The financial crisis of the late 2000s hit the Portuguese economy hard, forcing Lisbon to request a rescue program from the European Union and the International Monetary Fund. The country's main geopolitical challenge is to reconcile its competing interests as a former colonial empire, Atlantic nation and member of the European Union to secure economic prosperity and political stability for its approximately 10 million inhabitants.