Indeed, political turmoil elsewhere around the Mediterranean has benefited Europe's southern coast. Last week, an association of entrepreneurs in the Canary Islands, the Spanish archipelago off West Africa, forecast that before the end of the year, their region would welcome an additional quarter-million people who had initially planned to escape Europe's winter cold by vacationing in Egypt but now planned to go elsewhere in response to the military takeover and rioting.
(Read More: Chinese Overtake Germans as Biggest Spending Tourists)
Spain has perhaps been the main tourism beneficiary of the repercussions of events in the Arab world and Turkey, according to travel experts and early estimates. Tourists visiting Spain spent 32 billion euros, about $42 billion, in the first seven months of the year, up 6 percent from 2012 (including spending on transportation), according to data released last Tuesday by Spain's tourism ministry.
Tourist spending is a small fraction of the $1.3 trillion Spanish economy, but it is a financial bright spot for a country that has not had many in recent years. In the first seven months of 2013, Spain welcomed a record 34 million foreigners, a rise of 4 percent from a year earlier.
British visitors accounted for almost a quarter of the total. But the strongest percentage rises came from tourists from Russia, up more than 30 percent, to 840,000, and the Nordic countries, increasing 18 percent to 2.9 million.
Many analysts now expect the number of foreign tourists visiting Spain in 2013 to breach 60 million for the first time, besting the record of 59.2 million visitors in 2007.
More from the New York Times:
Egypt: Last place on tourism list
China: Foreign tourism falls, and smog may be one reason
Luring Tourists Back to Greece
Demand has been strong enough that in some countries, hotels have been able to raise prices. Jürgen Ringbeck, who oversees the transport, tourism and travel practice at the management consulting firm Booz & Company in Germany, said it was striking how far "the Spanish market has been able to capture more demand even by increasing prices." He said the average cost of a Spanish hotel room had climbed more than 20 percent since 2009, reaching about $70 a night on average this year, which is also above the precrisis level of $67.
"The pricing power of the Spanish market is surprisingly strong," Mr. Ringbeck said, "which shows that operators have really understood that their major competitors in North Africa are no longer in a position to be very attractive."
Not all the South European travel markets have pricing power. Greek operators have opted for more aggressive pricing and more package holidays than in the past, said Mr. Ringbeck, who estimated that Greece's hotel prices were down around 10 percent from last year.
The Greek travel sector, which represents as much as 15 percent of Greece's $251 billion economy, has had to claw its way back after crippling transport strikes and other labor protests scared away many tourists.
(Read more: The accidental tourists: Europeans stay home, Asians don't)
Although Greece remains in financial trouble and is expected soon to need even more international assistance, Yannis Stournaras, the Greek finance minister, told Parliament last week that Athens was on target to raise its gross domestic product this year, mainly because of tourism.
The number of visitors to Greece is expected to top 17 million this year, up from 15.5 million in 2012. The Bank of Greece says revenue from tourism rose 18 percent in the first half of the year, to $4.4 billion.
In Portugal, meanwhile, tourism revenues rose 8.2 percent in the first half of the year, also as a result of more visitors from Northern Europe and Russia.
And even though large-scale infrastructure spending almost dried up in Spain after 2008, some tourism-related investments have gone ahead. A dredging project has eased access for cruise ships to the inland river port of Seville, where Christopher Columbus started one of his famous voyages.
Last Tuesday, the Azamara Quest, a cruise ship operated by Royal Caribbean International, docked in Seville for a two-day visit with about 600 tourists aboard. From January to July, ships carrying almost 10,000 passengers traveled to and from Seville, a rise in traffic of 28 percent from a year earlier, according to the local authorities.
(Read more: China ends Japan's dominance of Korean tourism market)
Here in Tarifa, Javier de la Rubia, the third-generation owner of a hotel, reopened his establishment in July after 18 months of renovations that involved adding another floor and an underground parking garage. The bursting of Spain's construction bubble in 2008 meant that "building companies were at a standstill," he said, "so this was the right timing to negotiate the terms that I wanted.
Some towns have found new ways to pull in tourism dollars. Last week, Buñol, in eastern Spain,caused a stir when it began charging visitors to attend its "Tomatina," a tomato-hurling street party that started in 1945 and has become one of Spain's best-known summer fiestas. The town hall sold 15,000 tickets to visitors for $13 each, while setting aside 5,000 free tickets for residents.
Not all the locals, however, are applauding Spain's tourism rebound. Miguel Pelegri, a native of Tarifa, filed several police complaints this summer because of the late-night revelry outside his home, and because trash had been dumped on his front stoop.
"The town hall just wants more visitors, rather than trying to manage and also educate tourists," he said. Then again, he acknowledged, "my income doesn't depend on tourism, so I don't have the same point of view as those who do."