NAIROBI, Kenya — Somali militants burst into a university in eastern Kenyaon Thursday and killed nearly 150 students in the worst terrorist attack since the 1998 bombing of the United States Embassy here, laying bare the nation’s continuing vulnerability after years of battling Islamist extremism.
A small group of militants, most likely between four and 10, roved from dorm to dorm, separating Christian from Muslim students and killing the Christians, the authorities said. Students described being awakened before dawn by the sound of gunfire and fleeing for their lives as masked attackers closed in.
Officials said that by the time Kenyan commandos cornered and killed the attackers on an upper floor, 147 people lay dead.
Despite new security laws, significant Western help and a heightened state of vigilance that has already put police officers on almost every major street corner in the capital, Nairobi, Kenya remains squarely in the cross hairs of the Shabab, the Somali terrorist group that immediately claimed responsibility for the attack on Thursday.
The Shabab has killed hundreds of Kenyans — on country buses, in churches, in remote coastal towns and inside one of Kenya’s fanciest mallsduring a devastating siege in 2013 that left 67 people dead and rattled Kenya’s prized image as a cornerstone of stability in this part of Africa. The Kenyan government is so desperate to stop the Shabab, one of the most violent franchises of Al Qaeda, that some officials have even proposed building a 424-mile wall across the entire Somali border.
Kenya’s tourist industry, one of the pillars of its economy, has been badly damaged by the terrorist attacks, and the bloodshed on Thursday is sure to make things worse. There are also fears that the Shabab’s relentless emphasis on singling out Christians could inflame religious strife in a country already wrestling with tensions between a Muslim minority, which has complained about government persecution, and a Christian majority that increasingly feels under attack.
The violence Thursday came just days after President Obama announced that he would visit Kenya in July, his first trip to his father’s homeland since taking office. Mr. Obama had stayed away until now, at least in part out of concerns about Kenya’s public safety.
The White House issued a statement condemning the attack and vowing to continue assisting Kenya in fighting the Shabab — in recent months, the American military has killed the group’s leader and other operatives — but it offered no indication of whether the university siege would change Mr. Obama’s travel plans.
The Kenyan authorities said that around dawn, the attackers stormed Garissa University College in the town of Garissa, about 90 miles from the Somali border. Though the college is in a predominantly ethnic Somali area of Kenya, it attracts students from across the country, many of them non-Muslim.
In a statement early on Thursday, the Shabab said that its fighters had attacked the university early in the morning, separating Muslims from non-Muslims in an “operation against the infidels.”
In an audio message soon after, a Shabab spokesman, Ali Mohamoud Raghe, said the attack had been carried out because “the Christian government of Kenya has invaded our country,” a reference to the Kenyan military’s 2011 incursion into Somalia to oust the Shabab from its strongholds.
He said the university had been targeted because it was educating many Christian students in “a Muslim land under colony,” a reference to the large Somali population in a part of Kenya that Somalia once tried to claim. He called the university part of Kenya’s “plan to spread their Christianity and infidelity.”

MAY GOD HAVE MERCY ON THOSE WHO DIED AND GIVE STRENGTH TO THEIR FAMILIES. 
DEAR LORD PLEASE ALSO HAVE MERCY ON THE GUNMEN! HELP OTHERS TO NOT FALL INTO THIS DEVIOUS SIN, ALSO, MY GOD!