Spain is the busiest seaport in the Mediterranean basin, 5th busiest in Europe and 30th busiest in the world. There are four other Spanish ports in the ranking of the top 125 busiest world seaports (Algeciras, Barcelona, Las Palmas, and Bilbao); as a result, Spain is tied with Japan in the third position of countries leading this ranking. Export growth During the boom years, Spain had built up a trade deficit eventually amounting a record equivalent to 10% of GDP (2007) and the external debt ballooned to the equivalent of 170% of GDP, one of the highest among Western economies. Then, during the economic downturn, Spain reduced significantly imports due to domestic consumption shrinking while – despite the global slowdown – it has been increasing exports and kept attracting growing numbers of tourists. Spanish exports grew by 4.2% in 2013, the highest rate in the European Union. As a result, after three decades of running a trade deficit Spain attained in 2013 a trade surplus. Export growth was driven by capital goods and the automotive sector and the forecast was to reach a surplus equivalent to 2.5% of GDP in 2014. Exports in 2014 were 34% of GDP, up from 24% in 2009. The trade surplus attained in 2013 has been consolidated in 2014 and 2015. Despite slightly declining exports from fellow EU countries in the same period, Spanish exports continued to grow and in the first half of 2016 the country beat its own record to date exporting goods for 128,041 million euros; from the total, almost 67% were exported to other EU countries. During this same period, from the 70 members of the World Trade Organization (whose combined economies amount to 90% of global GDP), Spain was the country whose exports had grown the most. In 2016, exports of goods hit historical highs despite a global slowdown in trade, making up for 33% of the total GDP (by comparison, exports represent 12% of GDP in the United States, 18% in Japan, 22% in China or 45% in Germany). In all, by 2017 foreign sales have been rising every year since 2010, with a degree of unplanned import substitution -a rather unusual feat for Spain when in an expansive phase- which points to structural competitive gains. According to the most recent 2017 data, about 65% of the country's exports go to other EU members. Sectors The Spanish benchmark stock