"We are mopping up the area," Interior Minster Joseph Nkaiserry told reporters, saying that four gunmen had been killed after Kenyan troops launched an assault on the final building where the insurgents had holed up for over 12 hours.
"Unfortunately, we lost... A number of lives, we have not confirmed fully, but it is in the region of 70 students, and 79 have been injured, nine of them critically," he added.
"The terrorists, 90 per cent of the threat has been eliminated... We have been able to confirm that four terrorists have been killed," he added, saying that troops were scouring the campus as the total number of gunmen was not known, but that the main operation was over.
"We are mopping up the area, and will update with the number of casualties," he said, imposing a dawn until dusk curfew on several northern and eastern Kenyan districts.
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.