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 percent from a year earlier, the tourism ministry said. Excluding local tourists, the number of night stays fell 6.1 percent year-on-year, it added.
Seventeen people, including eight French nationals, were killed in an April 28 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 percent 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 percent from a year earlier and France, down 10 percent, it said.
However, the number of visitors from Germany rose 10 percent and those from both Britain and the Middle East rose by seven percent, 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.
(Editing by David Lewis/Anna Willard) ($1=7.812 Moroccan dirhams)