David Waweru was watching a World Cup match in a bar in the Kenyan coastal town of Mpeketoni when fighters from Somalia's Islamist Shebab militants began their attack.
The first target was the police station, where dozens of gunmen fought a fierce battle with the outnumbered local police. The sound of gunfire alerted the rest of the town that something was wrong, but few could imagine what would happen next.
"We were watching football when the shooting started, and the owner asked us to leave," Waweru recounted, saying he left the Costa Rica cafe and, in a decision that that would save his life, hid in the darkness behind a nearby house.
Across the road was Mama Monica's Guest House, and from his hiding place the young man could only watch in horror as the next phase of the attack played out.
Waweru said the people inside initially hid in their rooms, only to be hunted down and hauled to the dusty street outside.
"They arrived and asked people to get out. They asked them to lie down, and then they shot them one by one, right in the head, one after another."
The assault on Mpeketoni, near the coastal island and popular tourist resort of Lamu, left at least 49 dead and was the worst attack by the Shebab on Kenyan soil since last September's siege of the Westgate shopping mall in the capital Nairobi, in which 67 people were killed.
The al Qaeda-linked Islamists also appeared to follow the same tactic of singling out non-Muslims for immediate execution -- although the town, on the Muslim-majority Indian Ocean coast, is known as being home to mainly Christian settlers from central Kenya.
"They asked people if they know anything about Islam. They wanted you to give shahada," or recount the Muslim profession of faith, Waweru said, adding that the killings were carried out to chants of 'Allahu Akbar' ('God is Greatest').
Watch: Islamist gunmen kill at least 48 in Kenyan coastal town
Muslim prayer test
"They did not kill women and children, only men. They said they were doing that because the government of Kenya is killing people in Somalia."
Kenyan troops crossed into southern Somalia in 2011 to fight the Shebab, later joining the now 22,000-strong African Union force battling the militants and supporting the war-torn Horn of Africa nation's internationally-backed but fragile government.
Local teacher John Mwagi, 44, saw a similar pattern of killings in the town, which is around 100 kilometres (60 miles) from the border with Somalia.
"Women and children were put aside. All of those who were killed were Christians. If you were a Muslim you were spared," he said.
He said he also saw the attackers accompanied by a small boy who was carrying Shebab's black flag, before managing to sneak away and escape on a motorbike.
The manager of Mpeketoni's New Breeze hotel, which was also burned down in the attack, also saw the attackers singling out non-Muslim men to be killed.
"They asked women and children to stand aside and the men to get down, and asked if they knew how to pray. They were speaking Somali," the manager, John Wanyoike, told AFP.
Looking at the smouldering remains of his hotel, he recounted how the attackers arrived on a minibus after dark on Sunday night, and when confronted with locked hotel room doors began shooting in the windows.
"There was only one guest in the hotel. All the others had left to an other place, because we don't sell beer here," he said, explaining how he hid in a darkened room from where he heard the attackers communicate on radios and then set fire to the building.
"I felt desperate because the police did not come, so all I could do was to try and escape."