TUNIS (Reuters) - The number of foreign tourists in Tunisia rose by 23 percent in 2017 compared with the previous year, official data showed, indicating that a vital industry crippled two years ago by Islamist attacks 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 6.731 million tourists visited the North African country in the year until Dec. 20, data provided by the presidency showed. The number of European tourists rose by 19.5 percent to 1.664 million, the data showed. The number of French visitors rose by 45.5 percent and the number of Germans by 40.8 percent in the same period. The number of Algerians visiting rose by 40.5 percent to 2.322 million. Tunisia s tourism revenues rose by 16.3 percent to 2.69 billion dinars ($1.09 billion), data showed. In 2010 Tunisia s tourism revenues had hit a record at 3.5 billion dinars with almost 7 million tourists visiting. The rise is helping the government weather an economic crisis as it plans to raise taxes from 2018, part of reforms agreed with the International Monetary Fund in return for a loan package. High unemployment has driven youth to seek illegal migration to Europe. 