GARISSA, Kenya -- Students were jolted awake by the sound of gunfire early Thursday morning at a university in northeastern Kenya as heavily armed gunmen shot their way past the school's main gate and forced their way into the dormitories.
Eyewitnesses at Garissa University College said the masked attackers -- strapped with explosives and armed with AK-47s -- fired indiscriminately at first but soon began a deadly march from room to room, demanding to know if the people inside were Muslim or Christian.
According to police and witnesses, some non-Muslims were shot immediately, CBS News correspondent Debra Patta reported. Others ran for their lives.
"We were hearing and seeing the gunshots but we were not seeing the people themselves," one student said. "People who were shooting at us."
Most of the 147 dead were students, but two security guards, one policeman and one soldier also were killed in the attack, Interior Minister Joseph Nkaissery said. At least 65 people were taken to hospitals, mostly suffering from gunshot wounds.
Amid the massacre, the men took dozens of hostages in a dormitory as they battled troops and police before the operation ended after about 13 hours, witnesses said.
When gunfire from the Kenyan security forces struck the attackers, the militants exploded "like bombs," Nkaissery said, adding that the shrapnel wounded some of the officers.
The Somali-based militant group al-Shabaab has claimed responsibility for the attack. The university in Garissa is only 90 miles from the Somali border.
The al Qaeda-linked group has been blamed for a series of attacks in Kenya, including the siege at the Westgate Mall in Nairobi in 2013 that killed 67 people, as well as other violence in the north. The group has vowed to retaliate against Kenya for sending troops to Somalia in 2011 to fight the militants staging cross-border attacks.
Police identified a possible mastermind of the attack as Mohammed Mohamud, who is alleged to lead al-Shabaab's cross-border raids into Kenya, and they posted a $220,000 bounty for him. Also known by the names Dulyadin and Gamadhere, he was a teacher at an Islamic religious school, or madrassa, and claimed responsibility for a bus attack in Makka, Kenya, in November that killed 28 people.
One of the survivors of Thursday's attack, Collins Wetangula, told The Associated Press he was preparing to take a shower when he heard gunshots coming from Tana dorm, which hosts both men and women, 150 yards away. The campus has six dorms and at least 887 students, he said.
When he heard the gunshots, he locked himself and three roommates in their room, said Wetangula, who is vice chairman of the university's student union.
"All I could hear were footsteps and gunshots. Nobody was screaming because they thought this would lead the gunmen to know where they are," he said.
He added: "The gunmen were saying, 'Sisi ni al-Shabaab,'" -- Swahili for "We are al-Shabaab."
He heard the attackers arrive at his dormitory, open the doors and ask if the people who had hidden inside were Muslims or Christians.
"If you were a Christian, you were shot on the spot," he said. "With each blast of the gun, I thought I was going to die."