Sousse (Tunisia) - Casually dressed in dark shorts, a necklace and T-shirt, he would have looked like any other young Tunisian among the German, British and Irish sunbathers soaking up the Mediterranean heat on one of Tunisia's long, yellow beaches.
In just five minutes, armed with the black Kalashnikov he had hidden in his beach umbrella, Saif Rezgui unleashed horror across the Imperial Marhaba resort, leaving 38 victims dead among the deck chairs and pool loungers.
It was the worst attack of its kind in Tunisia's modern history. The Islamic State in Iraq and Syria (ISIS) claimed responsibility though the authorities say Rezgui, a 23-year-old student, was not on any terrorism watchlist or a known militant.
Witnesses say the gunman, dressed like a tourist, drew little attention. He opened fire suddenly, making his way from the beach to the pool and hotel, selecting foreigners, pursuing his victims even as they fled indoors.
Rezgui was apparently well aware of the hotel's layout, a security source said. He had time to reload his rifle at least twice before he was finally confronted and shot dead by police outside the hotel.
Panicked tourists fled from the beach, running among the umbrellas, some falling among the white plastic sun loungers, their bodies later to be covered with towels and sheets. Blood was smeared over the steps leading into the hotel.
Some said it took the police and security officers at least 30 minutes to respond after the shooting started.
"I can't understand why they didn't arrive earlier," said Mr Khmais Bouzayane, 45, a long-time employee of the hotel. "I lived in an unimaginable terror. I hid near the pool, in the engine room below the ground."
Hours after the assault, he said, police officials were still combing through the hotel grounds and medical crews were "still picking bodies from the sea - the sea has the biggest number of bodies".
A popular tourism destination, Tunisia has emerged from political upheaval after its 2011 uprising against autocrat Zine el-Abidine Ben Ali. Praised for its transition to democracy, the country is also struggling with rising Islamist militancy.
Tunisian authorities were already on the alert, months after two gunmen killed 21 foreign tourists at the Bardo Museum in Tunis, gunning down Japanese, French and Spanish visitors as they arrived by bus.
Like the Bardo attackers, the young Tunisian gunman appears to have fallen prey to extremist recruiters, radicalised and drawn away from his life as a student in a very short time, security sources said.
By official accounts, Rezgui was a dedicated student from a stable family who enjoyed partying and practised break-dancing. In a pattern similar to other Tunisia militants, he appeared to have come into contact with extremist preachers about six months ago, a senior security source said.
"He was a good student and always attending class," Prime Minister Habib Essid said. "Our investigations show he didn't reveal any signs of extremism, or ties to terrorists. He wasn't even on a watchlist."
Packed with European holidaymakers, the resort would have been a desired target for militant groups who have attacked North African tourist sites before, seeing them as legitimate targets because of their open Western lifestyles and tolerance of alcohol.
"I was on the beach when he started shooting. We got everyone back towards the hotel, but he followed us. He targeted the foreigners but not the Tunisians," said a waiter named Wadia.
"When he saw a Tunisian, he shouted out 'get out of the way' and shot at foreigners."
Reuters, New York Times