TUNIS- The number of foreign tourists in Tunisia has risen by 24 percent so far this year, official data showed, indicating that a vital industry crippled two years ago by Islamist attacks on holidaymakers is recovering.

Tourism accounts for about 8 percent of Tunisia's gross domestic product, provides thousands of jobs and is a key source of foreign currency, but has struggled since two deadly militant attacks in 2015.

A total of 5.55 million foreign tourists visited the North African country between Jan. 1 and Oct. 10, compared with 4.49 million in the same period last year, according to the data sent to Reuters on Tuesday.

Visits by European tourists rose by 18 percent to 1.461 million while the number from neighbouring Algeria jumped by 44 percent to 1.856 million.

Officials expect the number of foreign tourists to rise to 6.5 million this year, up about 30 percent from 2016, due to an improving security situation and interest from new markets such as Algeria and Russia.

The rise is helping the government weather an economic crisis as it prepares to raise taxes in the 2018 budget, part of reforms agreed with the International Monetary Fund in return for a new $350 million loan.

(Reporting by Tarek Amara; Editing by Ulf Laessing and Mark Heinrich) ((tarek.amara@thomsonreuters.com;))