Party-goers watch the sunset on a beach in San Antonio, Ibiza, where two imams were arrested on terrorism charges Getty

Two Muslim preachers have been arrested on the resort island of Ibiza on suspicion of supporting the Islamic State (Isis/Daesh) terrorist group and inciting violent jihad.

The imams, aged 31 and 35, were detained in the popular tourist town of San Antonio on Tuesday (25 October), Spanish police said.

"They publicly and repeatedly expressed on social networks their support for the terrorist group Daesh, its methods and its Salafist-jihadist ideology," the Guardia Civil said in a statement.

It added that the imams were Moroccan nationals, and were "imams in a mosque, a privileged position from which to exert influence over members of the Muslim community on the island".

Officers said the younger of the two used his Facebook account to "spread ISIS propaganda". They also claimed the pair had incited worshippers at their mosque – named as Masjid al Fath – to hate non-Muslims and praised those who fought for IS in Iraq and Syria.

A spokesman for Spain's Interior Ministry said: "One of the things that most worried investigators was the influence that both individuals exerted on the members of the Islamic community in Ibiza, highlighting as especially serious the problem of children who went to classes they taught themselves at the mosque."

San Antonio, on the west of the island, is Ibiza's second-largest town and one of the most popular nightlife destinations in the Mediterranean.

The island, which has a population of about 132,000, has gained a reputation as the clubbing capital of the world.

There was no suggestion from police any tourists or Ibiza's residents were at any risk of a terrorist attack. Spanish authorities have arrested 156 people since 2015 on suspicion of being jihadists, according to Associate Press.