SOUSSE, Tunisia — In the final moments of the worst terrorist attack in Tunisia’s history, witnesses recalled, the assailant casually strolled to the ocean at a popular resort to wash his hands and face.
Moments earlier, they said, the man later identified by authorities as Seifeddine Rezgui had been methodically stalking mostly European tourists with an assault rifle and grenades. In a half-hour rampage Friday that shocked the world in its brutality, Rezgui killed 39 people and wounded dozens as they sunbathed on a pristine beach in Sousse.
But as he finished cleansing himself, Rezgui turned toward a group of nearby Tunisian hotel workers who were frantically dragging wounded beachgoers away from the violence.
“He fired his Kalashnikov into the air and yelled, ‘Run! Get away! I’m not here to kill you!’ ” said Ibrahim Ghrib, 23, a lifeguard who witnessed the encounter.
To Ghrib, the message was clear. The Western tourists who used to pack this tiny Mediterranean country’s placid beach resorts are no longer welcome, at least not by the Islamist extremists who seem to hold increasing sway here.
Friday’s attack at the Imperial Marhaba hotel grounds was carried out with a ruthlessness associated with the Islamic State, which increasingly appears to threaten the politics of moderation that have steered Tunisia, the birthplace of the Arab Spring, on a democratic path since its revolution.
Shortly after the killings Friday, the extremist group that controls swaths of Syria and Iraq asserted responsibility for the assault, identifying Rezgui as Abu Yahya al-Qirawani, a nom de guerre. Not long after the attack, law enforcement officers fatally shot the 24-year-old Tunisian national.
On Saturday, Tunisia’s prime minister, Habib Essid, announced several security measures in response to the attack, including the closure of dozens of mosques linked to extremists.
But that did not calm the nerves of tourists in Sousse, about 90 miles south of Tunis, the capital, who scrambled Saturday to leave for their home countries. Special flights to Europe from a nearby airport were organized for vacationers.
Tobias Ellwood, Britain’s minister for the Middle East, said Saturday that at least 15 British nationals were killed in the attack. Others slain were from Germany, Ireland, Belgium and Portugal, as well as Tunisia.
Witnesses to the Friday attack, which started just before noon, described scenes of chaos and carnage.
Ghrib, the lifeguard, said he was on duty at the nearby Palm Marina hotel beach when he first saw Rezgui walking along the water several yards away holding a red umbrella and wearing a black shirt and black swim shorts. He said Rezgui then dropped the umbrella, which he had used to conceal an assault rifle, and opened fire on dozens of people lounging on beach chairs.
“I immediately started shouting at people on the beach to run to the hotel,” Ghrib recalled.
Tourists began running for safety, many of them covered in blood as they streamed into the patio restaurant at the Palm Marina hotel. Their screams startled Mandy Morris, 52, a Briton who initially mistook the crackle of gunfire for fireworks.
Shortly beforehand, she said, she noticed a small boat racing to shore and away from recreation boats in the water. A few moments later, she said, she began hearing automatic-weapon fire.”
“I’m still suspicious of who was on that boat. It just came straight to shore,” said Morris, who fled for cover with her husband in the Palm Marina.
Alexander Nicolai, 48, recalled seeing two people leave the boat on the beach next to him. The shooting started as the men jumped off the boat, which he described as a rubber dingy. But he said he could not determine whether the men on the craft were assailants.
It is still unclear whether Rezgui had accomplices in the attack.
On Friday evening, Mohammed Ali Aroui, an Interior Ministry spokesman, told Tunisian television that law enforcement officials were pursuing another suspect, although he declined to provide details. Contacted by telephone, an official at the Interior Ministry said Saturday that one suspect had been arrested. Citing a lack of authorization, the employee, who declined to give details, spoke on the condition of anonymity.
Diane Darlington, 21, said she and a friend thought they heard gunfire from three different locations near the site of the attack. They ran for cover in their fourth-floor room at the Palm Marina, where they watched events on the beach.
“We’re certain there were three of them,” said Darlington, a Briton from York.
Shams Eddine Bowmaffeh, who works at the Palm Marina pool area, remembered seeing only one assailant, Rezgui. After helping tourists take cover in the hotel, Bowmaffeh, 20, recalled running toward the Imperial Marhaba beach to check on wounded tourists.
By then, he said, Rezgui had left the beach and entered the Imperial Marhaba, attacking the hotel pool area with at least one grenade. Rezgui then entered the hotel’s reception area, opening fire with the assault rifle, which he reloaded multiple times during the rampage, witnesses said.
About 30 minutes into the incident, Bowmaffeh said, Rezgui walked back to the beach area of the Imperial Marhaba. At that moment, Bowmaffeh was helping lifeguard Ghrib and about a dozen other hotel workers pull wounded tourists off the beach.
They all paused in disbelief as the killer washed his body before firing his weapon into the air and warning them to leave, Bowmaffeh said. Then Rezgui walked northward along the beach, somewhere afterward meeting his fate with Tunisian police.
“He washed himself calmly, like he hadn’t just killed dozens of innocent people,” said Bowmaffeh. “It was pure evil.”