World leaders have unanimously condemned the terror attacks which rocked at least three continents from the Middle East to North Africa and Europe on a single day claiming dozens of lives.

In the string of Islamist attacks, a man was beheaded at a gas factory in France, at least 37 people were killed in a Shiite mosque attack in Kuwait, and 38 people were massacred by a gunman in a Tunisian beach resort.

There has been no indication so far that all the three attacks were coordinated but the Iraqi militant group Islamic State (Isis) has claimed responsibility for the assaults in Kuwait and Tunisia.

Condemning the bloodshed, UN Secretary General Ban Ki-moon said in a statement: "Far from weakening the international community's resolve to fight the scourge of terrorism, these heinous attacks will only strengthen the commitment of the United Nations to help defeat those bent on murder, destruction and the annihilation of human development and culture."

The attacks took place just days after the Iraqi Sunni extremist group called on Islamic followers across the world to turn the month of Ramadan, which is considered holy by Muslims, into "calamities for non-believers".

Most of the dead, including five Britons, in the shooting at the Tunisian resort of Sousse were European sunbathers. A lone gunman armed with a Kalashnikov randomly sprayed bullets at the tourists.

Prime Minister David Cameron tweeted: "I am sickened by the attacks in Tunisia, France and Kuwait. Our countries stand together in combating the horrors of terrorism."

This was the deadliest attack in Tunisia in several months.

"Once again, cowardly and traitorous hands have struck Tunisia, targeting its security and that of its children and visitors. No country is safe from terrorism, and we need a global strategy of all democratic countries," said Tunisian President Beji Caid Essebsi after visiting the rampage site.

The White House has also expressed solidarity with other nations in denouncing the attacks.

An official statement said: "We stand with these nations as they respond to attacks on their soil today and we have been in contact with appropriate counterparts in all three countries to offer any necessary support."

"Our thoughts and prayers are with the victims of these heinous attacks, their loved ones and the people of all three countries."