In what is believed to be the first suicide bombing in Tunisia, a man walked off the beach in a resort town on Wednesday and blew himself up in front of a seaside hotel. His was the only fatality.

Tunisia had largely avoided such violence but since the country kicked off the Arab spring by overthrowing its long-ruling secular dictatorship it has been affected by a rising Islamist insurgency in remote parts of the country. Wednesday's suicide attack is the first time such violence has reached a tourist area and raises fears for the country's tourism industry.

Witnesses told Tunisian media that the man appeared to be about to enter the Riadh Palm hotel in Sousse, about 90 miles south of the capital, Tunis, when he exploded. The interior ministry said no one else was injured and no property was damaged. It said the bomber was a Tunisian man and was wearing an explosive belt.

Police also arrested a man carrying explosives near the mausoleum of Habib Bourguiba, the country's first post-independence president, in the nearby city of Monastir, ministry spokesman Mohammed Ali Aroui told a local radio station. Both men appeared to belong to an extremist group, he said.

Sousse has long been a popular destination for European tourism, a sector that was recovering from a drop following the country's 2011 revolution when tourists stayed away amid the unrest in the country. A security vacuum opened up and many long-repressed hardline Islamic groups appeared, some of whom armed themselves with weapons from Libya.

After tolerating hardline groups such as Ansar al-Sharia, the moderate Islamist government banned them in September and began arresting members.

In the past year clashes have erupted in remote areas around the country as authorities discovered militant hideouts. Most recently six national guardsmen were killed when they surrounded a house in the impoverished interior province of Sidi Bouzid and a policeman was killed in the northern town of Beja on 23 October.

There are also frequent clashes with what are described as al-Qaida linked jihadists holed up in mountains along the Algerian border.

In February and in July prominent left-wing politicians were shot dead in front of their homes by alleged jihadists.

The Sousse attack, however, appears to be the first attempt at a mass civilian casualty bombing.