GARISSA, Kenya (AFP) - At least 147 students were massacred when Somalia's Shebab Islamist group attacked a Kenyan university on Thursday, the government said, after the deadliest attack in the country since US embassy bombings in 1998.
Hurling grenades and firing automatic rifles, the masked gunmen stormed the university in the northeastern town of Garissa as students were sleeping, shooting dead dozens before setting Muslims free and holding Christians and others hostage.
There are "147 fatalities confirmed in the Garissa attack," the national disaster operations centre said in a statement, confirming the seige was now over with all attackers dead.
"The operation at Garissa University College has ended, with all four terrorists killed," the centre said, after the attack which lasted some 16 hours from before dawn until well after dark.
At least 79 people were also wounded in the assault, which began when the first grenades were used before dawn to blast open the gates of the university, near the lawless border with war-torn Somalia.
In the final hour before darkness fell, Kenyan troops stormed the student dormitory where the gunmen were holed up as explosions and heavy gunfire rang out.
Troops then continued to search the campus for any possible insurgents.
"We are mopping up the area," Interior Minister Joseph Nkaiserry told reporters, saying that four gunmen had been killed after Kenyan soldiers launched an assault on the final building.
The number of people killed was "in region of 70 students, and 79 have been injured, nine of them critically," he said, with an exact toll expected on Friday.
It is the worst attack in Kenya since the 1998 bombing of the US embassy in Nairobi by Al-Qaeda, when 213 people were killed by a huge truck bomb.
"The terrorists, 90 per cent of the threat has been eliminated... we have been able to confirm that four terrorists have been killed," Nkaiserry added, saying that troops were scouring the campus as the total number of gunmen was not known, but that the main operation was over.
The attack was claimed by Al-Qaeda-linked Shebab fighters, the same insurgents who carried out the Westgate shopping mall massacre in Nairobi in September 2013, when four gunmen killed at least 67 people in a four-day siege.
Shebab spokesman Sheikh Ali Mohamud Rage told AFP the gunmen had taken non-Muslims hostage, and that their mission had been "to kill those who are against the Shebab."
It was not clear if any of the students the Shebab said they had held were alive at the time of the final assault by troops.
However, officials said over 500 students had been accounted for.
"Kenya is at war with Somalia," Rage said, referring to the thousands of Kenyan troops in Somalia as part of an African Union military mission.
Soldiers with tanks were deployed around the campus.
'GUNMEN SHOT INDISCRIMINATELY'
A US$215,000 (S$292,000) bounty was offered for the capture of alleged Shebab commander Mohamed Mohamud, a former Kenyan teacher believed to now be in Somalia and said to be the mastermind behind the Garissa attack.
The garrison town is around 150km west of Somalia and has been targeted in the past by militants from the Shebab.
Police chief Joseph Boinet said "the gunmen shot indiscriminately" after storming the compound.
The sprawling campus on the outskirts of town has both teaching areas as well as residential blocks.
The university has several hundred students from different parts of Kenya, and the first bodies of some of those killed were flown to Nairobi late Thursday for families to collect on Friday, the start of the Easter weekend, a major holiday in the country.
SENSELESS, BARBARIC, HEINOUS
A dawn until dusk curfew has been imposed on several northern and eastern Kenyan districts for two weeks.
Kenya has been hit by a wave of grenade and gun attacks, often blamed on sympathisers of the Shebab and sometimes aimed at police targets, since the army crossed into southern Somalia in 2011 to attack Islamist bases.
A series of foreign travel warnings in response to the threat have crippled Kenya's economically important tourism industry.
On Wednesday, just hours before the Garissa attack began, President Uhuru Kenyatta said Kenya "is as safe as any country in the world."
On Thursday, he offered condolences to those killed but said security forces had made the "appropriate deployment to the affected area."
However, he also ordered the "urgent" enrolment of a planned 10,000 police recruit boost, warning Kenya had "suffered unnecessarily due to shortage of security personnel."
International figures condemned the attack.
UN Secretary-General Ban Ki-moon on Thursday called for those responsible to "be swiftly brought to justice."
British Minister for Africa James Duddridge called the killings "senseless" and "barbaric", while US ambassador Robert Godec said the slaughter was "heinous".
Kenya's government has been under fire since the Westgate attack.
In June and July last year Shebab gunmen killed close to 100 people in a series of attacks on the town of Mpeketoni and nearby villages.
In November, the Shebab claimed responsibility for holding up a bus outside Mandera town, separating passengers according to religion and murdering 28 non-Muslims.
Ten days later 36 non-Muslim quarry workers were also massacred in the area.