Tunis: The number of foreign tourists in Tunisia rose by 23 per cent in 2017 compared with the previous year, official data showed, indicating that a vital industry crippled two years ago by attacks is recovering.

Tourism accounts for about 8 per cent 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 6.731 million tourists visited the North African country in the year until December 20, data provided by the presidency showed.

The number of European tourists rose by 19.5 per cent to 1.664 million, the data showed. The number of French visitors rose by 45.5 per cent and the number of Germans by 40.8 per cent in the same period.

The number of Algerians visiting rose by 40.5 per cent to 2.322 million.