By Tarek Amara

TUNIS (Reuters) - A suicide bomber blew himself up in the Tunisian tourist resort of Sousse on Wednesday, the first such assault in more than a decade in a country now battling Islamist militants boosted by chaos in neighboring Libya.

Police foiled another attack when they arrested a would-be suicide bomber at former President Habib Bourguiba's tomb in the seaside town of Monastir, and detained five other people in Sousse thought to be plotting assaults, security sources said.

No group has claimed responsibility for the attacks, but the Islamist-led government said all the arrested men had admitted to being members of the militant Ansar al-Sharia movement, which it says is linked to al Qaeda's North Africa affiliate.

"The two suicide bombers are radical Islamist jihadists. They are Tunisians, but they had been in a neighboring country," said Interior Ministry spokesman Mohammed Ali Aroui, without specifying the country.

The first bomber had tried to enter the Riadh Palms Hotel with a suitcase. Turned away, he ran onto the beach and blew himself up, a security source said. No one else was hurt.

The bombing is bad news for the vital tourism industry in Tunisia, which attracted 5.8 million mostly European visitors to its Mediterranean beaches and desert tours in 2012. Tourism is still recovering from the 2011 uprising that toppled the North African country's autocratic leader Zine al-Abidine Ben Ali.

Tunisia's stock market dropped 0.95 percent after the bombing.

"We don't know the consequences right now ... Whatever happens it will be negative because this is the first time they attack a hotel," said Mohamed Ali Toumi, head of Tunisia's federation of travel agencies.

Al Qaeda carried out Tunisia's only previous suicide bombing in 2002 when 21 people were killed at a synagogue on the island of Djerba.

Police tightened security in the capital Tunis and sealed off the nearby village of Sidi Bou Said, which is popular with tourists. Hundreds of police deployed in other resorts such as Hammamet and Djerba.

Rached Ghannouchi, leader of Ennahda Party, which governs in coalition with two secular parties, condemned attacks on tourists, which he said targeted Tunisia's political transition.

"Whoever tried to assault the tourists and the tomb of President Bourguiba are criminals who want to destroy the economy and democratic transition in Tunisia," he said.

"They will not succeed, thanks to the vigilance of our security and our army and our unity against terrorism."

CONSERVATIVE SALAFIS

Since the 2011 uprising, Islamists have pressed for strict Sharia law to be imposed in one of the Muslim world's most secular countries, which has strong ties to Europe.

Oppressed and jailed under Ben Ali, conservative Salafis - followers of a puritanical strain of Sunni Islam - have had more freedom to express their views since 2011.

Hardline Islamists have also attacked alcohol sellers, art shows, theatres and cinemas, and have taken over mosques.

The rise to power of an elected Islamist-led government has fuelled fears of many secular Tunisians that women's rights and liberal educational traditions may be eroded.

The ruling Ennahda party says even ultra-orthodox Islamist views must be accommodated in Tunisia's fledgling democracy, but that there is no place for armed militants.

Authorities say the militants have acquired weapons and training in neighboring Libya, where the government has failed to impose order since the 2011 fall of Muammar Gaddafi.

Ennahda accused Ansar al-Sharia militants of being behind the assassination of two secular opposition leaders this year.

Those attacks ignited protests by opposition supporters who said Ennahda had been lenient with hardline Islamists. Ennahda has agreed to step down within the next three weeks to end the unrest and make way for a caretaker government until elections.

Ansar al-Sharia was also blamed for inciting an attack by Islamist protesters on the U.S. embassy a year ago. Its leader is a former al Qaeda veteran who once fought in Afghanistan.

Nine Tunisian policemen were killed in clashes with militants earlier this month in two different cities.

(Reporting by Tarek Amara; writing by Patrick Markey; Editing by Alistair Lyon and Andrew Heavens)