A gunman has stormed a beach and hotel in a Tunisian resort and killed at least 37 people, the Health Ministry said, with many feared to be British.

The attacker rushed into the Imperial Marhaba hotel in the resort town of Sousse in the latest attack on the North African country's key tourism industry, the ministry said.

The Health Ministry said the dead included Britons, Tunisians, Germans and Belgians. At least 36 other people were wounded.

Wielding a Kalashnikov, the gunman entered from the beach, said ministry spokesman Mohammed Ali Aroui. Security forces responded and killed the attacker.

The Interior Ministry had previously said two attackers were involved, including one who fled the scene, but has since said a lone gunman was involved.

"A terrorist infiltrated the buildings from the back before opening fire on the residents of the hotel, including foreigners and Tunisians," Mr Aroui told the state news agency.

During the holy month of Ramadan Tunisia's Muslim population is less likely to go the beach, so the victims would have been predominantly foreign tourists. Local radio said most of the dead were German or British.

Rafik Chelli, one of Tunisia's leading security officials, told Mosaique FM that the gunman was unknown to authorities.

He said the man, from the city of Kairouan, came from the beach hiding his Kalashnikov under an umbrella before opening fire on tourists. From there he entered the hotel through the pool, shooting people as he went.

Since overthrowing its secular dictator in 2011, Tunisia has been plagued by terror attacks, although they have only recently targeted the vital tourism sector.

In March, two gunmen attacked the national museum in Tunis killing at least 22 people, all but one of them tourists. A group pledging allegiance to the radical Islamic State group claimed that attack and promised more in Tunisia.

Tourism is a major part of the Tunisian economy, especially in coastal resorts like Sousse and it suffered in the aftermath of the 2011 revolution.

With a return to stability and new elections late last year it was slowly recovering, until the attack on the Bardo museum.

Spanish prime minister Mariano Rajoy confirmed that the Imperial Marhaba is owned by the Spanish company RIU.

The company's media office said RIU's board of directors was holding an emergency meeting following the attack. The firm also offered its condolences to the victims and their families.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.