Tourist arrivals in Morocco rose 6.3 per cent in the first half of the year to 4.2 million, but the length of stay fell during a period that saw a bomb attack in the country's top tourist destination.
Tourism employs 450,000 people directly in Morocco and accounts for 10 percent of the country's gross domestic product.
The overall number of nights spent in tourist beds during the first half fell 2 per cent from a year earlier, the tourism ministry said. Excluding local tourists, the number of night stays fell 6.1 per cent year-on-year, it added.
Seventeen people, including eight French nationals, were killed in an 28 April bomb attack on a cafe in the heart of Marrakesh, the Morocco's top tourist town.
Data issued earlier this month showed that tourism receipts, a key source of foreign currency for the country, rose 9 per cent in the first half to 24.7 billion dirhams ($3.2 billion).
Morocco's currency is not fully convertible and higher tourism receipts help mitigate any destabilising impact on the banking system from a rising trade deficit.
"To the exception of Agadir, which witnessed a 4 percent rise in night stays, the majority of Morocco's main (tourist) destinations witnessed declines in night stays during the first half," said the ministry.
The sharpest declines in tourist arrivals during the first half were from Spain, down 30 per cent from a year earlier and France, down 10 per cent, it said.
However, the number of visitors from Germany rose 10 per cent and those from both Britain and the Middle East rose by seven per cent, it added.
Several tour operators have suffered a decline in demand for travel to Morocco and other North African nations like Tunisia and Egypt amid political unrest sweeping the region.
Europe's second-biggest travel company Thomas Cook for instance said in May the impact from the unrest would be worse than expected as holidaymakers avoided destinations in Egypt, Tunisia and Morocco.
Tourism Minister Yassir Znagui in May said tourism receipts are expected to grow even faster this year than in 2010 despite regional unrest and the Marrakesh.