(CNN) The sun hadn't risen at Garissa University College. Most students slept in their beds. A few had woken up to head to early morning Christian prayers.

It started with an explosion and gunshots around 5:30 a.m. Thursday (10:30 p.m. ET Wednesday) at the Kenyan school's front gates. The attackers continued to fire as they stalked through campus, with the Red Cross saying they stopped at a girls' dormitory.

At one point, they burst into a room where Christians had gathered and took hostages, said lecturer Joel Ayora. A student in the room told Alex Kubasu, a reporter with CNN affiliate Citizen TV, that the terrorists sprayed bullets indiscriminately, striking his thigh.

"Then they proceeded to the hostels," Ayora told CNN, referring to the university dorm, "shooting anybody they came across -- except their fellows, the Muslims."

According to AFP, the gunmen separated the students by religion and allowed Muslims to leave. This would be consistent with the past practices of Al-Shabaab, the Somalia-based terror group that's claimed responsibility for the attack. That's what Al-Shabaab did in a December raid on a quarry in the Kenyan village of Kormey, near the Somali border, that ended with at least 36 killed.

Whatever their religion, hundreds of students managed to escape, said Dennis Okari, a reporter with CNN affiliate NTV.

Some ran. Some crawled. All feared for their lives.

And they were the lucky ones.

'I am lucky to be alive'

It wasn't until about 15 hours after the attack began that the explosions and gunfire around Garissa finally ended. Interior Ministry Secretary Joseph Nkaissery announced that four terrorists were killed and the operation had ended "successfully."

By then, 147 people were dead and plans were "underway to evacuate students and other affected persons," the Kenya National Disaster Operation Centre tweeted.

"It is a very sad day for Kenya," Nkaissery said.

Some of those students, at one point or another, were believed to be hostages in one of the four dormitories on campus.

The gunmen are holed up inside the upper hostel section. I can hear gunfire from the other end @ntvkenya pic.twitter.com/BJfqBX7QFy — Dennis Okari (@DennisOkari) April 2, 2015

Yet others like Ayora managed to find safety, in his case at the staff residence. Others escaped the college's grounds. Okari, for instance, told CNN that he saw about 200 people sitting in the scorching mid-90-degree heat Thursday in a corner of a Garissa airstrip, surrounded by military officials.

One student, Japhet Mwala, recalled to AFP how "everyone started running" after hearing blasts and gunshots.

"There were those who were not able to leave the hostels where the gunmen headed and started firing," Mwala said. "I am lucky to be alive, because I jumped through the fence with other students."

Rosalind Mugambi fled into a nearby field with "bullets following us." She escaped unscathed, but a few of her friends did not.

"We saw some bloodstains," Mugambi told AFP, "and they were shot."

President: Kenyans should be calm, vigilant

Such terrorism, sadly, isn't new to the people of eastern Kenya. And that's largely thanks to Al-Shabaab.

While it is based in Somalia, the militant group has made bloody incursions into neighboring Kenya -- most notoriously a 2013 siege of Nairobi's upscale Westgate Mall that left at least 67 dead.

A primary aim of such attacks is thought to be sowing terror. There's also a religious undercurrent, given Al-Shabaab's once and possibly future goal of creating a fundamentalist Islamic state, according to the Council on Foreign Relations. Needless to say, that aim isn't shared in most places -- particularly in Kenya, where more than 80% of citizens are Christian.

Such violence is more likely in towns like Garissa, given its location 90 miles west of the Somali border.

As of this spring, the school had schools of education, information science, and arts and social sciences. And it was growing, with its staff of 75 set to expand to 200 by year's end, according to the college's website.

It's too early to tell what the future now holds for Garissa University College. But Kenyan President Uhuru Kenyatta on Thursday urged people around the African nation "to stay calm as we resolve this matter."

"This is a moment," Kenyatta said, "for everyone throughout the country to be vigilant as we continue to confront and defeat our enemies."