MADRID (Reuters) - The number of tourists visiting Spain in July fell for the first time in nine years, official data showed on Monday, in a sign numbers are stalling after five years of record growth as rival destinations tempt tourists with cheap, all-inclusive deals.

Slideshow ( 10 images )

Tourism accounts for around 11 percent of Spain’s economic output and the number of foreign visitors rose to 82 million last year, making Spain the world’s second most visited country after France. The sector is the biggest employer in Spain.

Visitor numbers fell by 4.9 percent in July, Monday’s data showed, the first fall for that key summer month since 2009.

In the first seven months, numbers rose by 0.3 percent, the lowest growth rate in eight years and compared to double-digit growth in 2016 and 2017.

Turkey, Tunisia and Egypt have experienced a resurgence in tourism, marking a revival of demand for these destinations which had been shunned by holiday-makers following militant attacks and an attempted military coup in Turkey in 2016.

This season they have been competing for German and British tourists with packages priced up to 73 percent cheaper than the popular Spanish resort islands of Ibiza, Mallorca and Menorca, according to one study.

Spanish hotels have cut prices in an attempt to lure back visitors, hoteliers and tourist officers have told Reuters.

In Tunisia, tourism jumped by 40 percent in the first half of 2018, its government said, driven by a strong return of European tourists three years after they were targeted in attacks. Egyptian numbers surged by a similar percentage.

In Turkey, tourism grew by nearly a third in the same period after slumping in 2016 following a series of bomb attacks and the abortive coup.

Spanish hotel operators have attempted to upgrade their offerings in response to the spike in visitor numbers of recent years, targeting high-spending tourists rather than those seeking cheap sun-and-sand packages.

Official data on Monday showed that, although the total spend of international tourists in July had fallen 0.9 percent from one year ago, the average spend was up 9.5 percent.