Spain “is expected” to replace the United States as the second most popular country in terms of tourist numbers, according to the World Tourism Organization (UNWTO).

The specialised agency of the United Nations will not release the official numbers from 2017 until spring, but early projections put France in first place and Spain in second – usurping the previous incumbent, the US.

Visitor numbers soared in 2017 according to the Spanish Prime Minister Mariano Rajoy, who announced last week that total earnings in the tourism sector rose by 12 per cent to €87bn euros (£77bn) last year.

This comes despite a year in which a very public independence battle raged in Catalonia, residents of Barcelona took to the streets to protest over-tourism, and a deadly terrorist attack saw a van drive into pedestrians on La Rambla in Barcelona, killing 13 people and injuring at least 130 others, one of whom died 10 days later.

Although the Catalonian political crisis led to a drop in visitor numbers to the northeast, tourism in Spain as a whole seems to have proven robust.

Meanwhile, across the pond, tourist numbers to the US dropped by five per cent in the first quarter and three per cent in the second quarter of 2017 following Donald Trump’s inauguration as President – a phenomenon which has been dubbed “Trump slump”.

And Experts at ForwardKeys, which predicts future global travel patterns by analysing more than 17 million booking transactions a day, claimed in October that international air arrivals to America had dropped by 1.4 per cent in total between 27 January and 30 September 2017 compared to the same period the previous year.

ForwardKeys’ analysts said there was a correlation between the first travel ban, in which President Trump announced that those from certain Muslim majority countries should not be allowed to enter the United States, and the decline of international visitors to the US.

The proposed ban also coincided with the strengthening of the US dollar, making it a more expensive prospect as a holiday destination.

John Kester, head of tourism trends at UNWTO, said: “We do see that demand for European destinations has been very strong. We also see important recovery in France.”

According to UNWTO data, 2017 was an exceptionally strong year for travel – it’s estimated that international tourist arrivals increased by 7 per cent worldwide. Southern and Mediterranean Europe in particular saw huge growth, with numbers up 13 per cent compared to 2016.

“International travel continues to grow strongly, consolidating the tourism sector as a key driver in economic development,” said UNWTO Secretary-General Zurab Pololikashvili. “As the third export sector in the world, tourism is essential for job creation and the prosperity of communities around the world.