British tourists have been describing an attack on a beach near the popular Tunisian resort town of Sousse.
At least 37 people have been killed, including Britons, Tunisians, Germans and Belgians, Tunisia's health ministry said.
The UK Foreign Office says it is investigating and holding discussions over whether to bring tourists home.
Prime Minister David Cameron said he offered "our solidarity in fighting this evil of terrorism".
At least one gunman has been shot dead and another is being pursued, officials say.
A man from south Wales is believed to be among the injured.
Matthew James, who is in his mid-20s, and from Trehafod, near Pontypridd, is thought to have been on the beach with his girlfriend and children when the gunmen opened fire. Reports say he is being treated in hospital.
An Irish woman in her 50s is among the dead, the Irish government confirmed.
The woman from County Meath, was on holiday with her husband who made contact with the Irish consular authorities.
Ireland's Minister for Foreign Affairs Charlie Flanagan said he could not rule out the possibility that other Irish people had also been killed.
Foreign office advice
A statement from the Foreign Office said gunmen attacked the Imperial Hotel and Hotel Club Riu Bellevue at Port El Kantaoui, near Sousse.
It added that some attackers may still be at large and urged those nearby to remain indoors, and contact their tour operator and the Foreign Office on 020 7008 0000.
"For security reasons they should not advertise their location on social media or when speaking to journalists," the statement added.
Tourists described "bullets whizzing around us" and scenes of "panic" at the Port El Kantaoui district, along with bodies being removed.
Gary Pine, from Bristol, who is on holiday with his wife and son at the El Mouradi Palm Marina hotel, said he had been on the beach with his family about noon when he heard a sound he initially thought was firecrackers.
"You could see within seconds of the noise breaking out that people started to exit the beach very, very quickly.
"It seemed to be happening 150 yards to our left. The people in the direct vicinity of the incident were breaking in all kinds of different directions.
"There was confusion. No-one knew what seemed to be breaking out. My wife was shouting to my son to get out the sea, and as he ran up the beach he said 'I just saw someone get shot'."
He also said that he heard an explosion on an adjacent hotel complex.
Abta, the Association of British Travel Agents, said around 20,000 visitors were currently on holiday with Abta members in Tunisia but added that there will also be a number of holidaymakers who have travelled independently.
The RIU group, which runs the Riu Imperial Marhaba Hotel, said in a statement that the majority of the guests are "from the UK and other central European countries".
Debbie Horsfall, from Huddersfield, was on the beach with her friend when the shooting began.
"My friend stood up and saw a man with the gun firing. We got up and ran, but we didn't know where to go.
"We have only been here two days - we came on Wednesday. We went to back to our room but we didn't feel safe.
"We just want to go home - we packed right away. We booked our holiday with Thomson. They said there are no flights at the moment until the airport is safe.
"At the moment the hotel and beach are on lockdown."
Steve Johnson, who is staying at the Imperial Marhaba hotel, was on the beach when the attack began. He says he tried to make sure others were safe until police arrived.
He told the BBC: "We shouted to everybody around us who joined the sort of mass rush from the beach and we ended up in the spa area of the hotel where we sort of tried to organise people to get themselves concealed away from windows, got the staff to lock all the doors.
"We stayed there until we started to see armed police officers and waited until we were told it was safe to come out."
He also said the authorities were now "removing a number of bodies from around the pool area".
Glenn Leathley told the BBC how his daughter Olivia, who is staying at the Riu Bellevue Park, was caught in the lobby of her hotel when a gunman entered.
He said: "She called to say she was running to find a safe place to hide. We didn't want to call back in case the phone ringing showed them the place where she was hiding."
He added that his daughter had since said she was safe.
John Yeoman tweeted a picture of his bed pushed up against the door in his hotel room with the caption "hope it's enough".
"We are all in shock here," he added.
Speaking in Brussels, Mr Cameron said there would be a meeting of the UK government's emergency Cobra group on Friday afternoon. It will be chaired by Foreign Secretary Philip Hammond.
Mr Cameron added: "We have got to do all we can to help.
"That means co-operating on counter-terrorism, building our capacity on counter-terrorism, it means dealing with the threat at source whether that is Isil [also known as Islamic State] in Syria and Iraq or whether it is other extremist groups around the world."
Mr Hammond has tweeted that his thoughts are "with all those caught up in today's appalling attacks".
Tunisia has been on high alert since March when militants killed 22 people, mainly foreign tourists, in an attack on a museum in the capital Tunis.
A suicide bomber blew himself up in a failed attack on the beach in Sousse in October 2013.
A spokeswoman for Thomson and First Choice said: "We are working closely with our teams in Tunisia and the relevant authorities to determine exactly what has happened and provide assistance to those affected."
Travel agency Thomas Cook also said it was offering support to people in the resort as well as giving those due to travel to Tunisia in the coming weeks the chance to change their booking free of charge.
Travel expert Simon Calder said British holiday companies would be trying to bring holidaymakers back to the UK.
"For the Foreign Office not to declare effectively the summer over for Tunisia would be frankly a surprise", he added.
Frank Gardner, BBC security correspondent, said the attack would be a "hammer blow" for the Tunisian tourist industry.
He said it showed that "despite Tunisia's best efforts the government has not got on top of the problem of international tourists being attacked in resorts".
Are you in Sousse? Have you been affected by the attack? Email email@example.com Please remember to leave your phone number if you are happy to be contacted by a BBC journalist.
You could also send us pictures on WhatsApp. Our number is: +44 7525 900971.
Read our terms and conditions.