Al-Shabaab militants have claimed responsibility for the attack on Garissa University College that left 15 people dead.
At least 65 others were wounded in the Thursday pre-dawn attack.
A spokesman for Somalia's Al-Qaeda-linked Al-Shabaab, told AFP the group was behind the early morning assault on the university in Garissa and had taken non-Muslims hostage.
"When our men arrived, they released the Muslims. We are holding others hostage," said Al-Shabaab spokesman Sheikh Ali Mohamud Rage, without giving numbers.
He said those seized were Christians and added that "our people are still there, they are fighting and their mission is to kill those who are against the Shabaab."
"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.
Gunfire could still be heard sporadically six hours after the attack began, as Kenya's Interior ministry said the "attackers have been cornered in one hostel".
The ministry also said "one suspected terrorist" had been arrested while attempting "to flee scene".
At least 15 people have been killed, according to a police source and media reports, while Kenya's official National Disaster Operation Centre said a further 65 had been injured, many suffering from gunshot wounds.
The Kenya Red Cross, which is leading the medical response to the attack, said there were "an unknown number of student hostages" and that "50 students have been safely freed".
Rage did not give details of casualties but said "there are very many".
The town of Garissa is around 150 kilometres (90 miles) west of Somalia and has in the past been targeted by militants from Al-Shabaab.
"Gunmen forced their way into Garissa University by shooting at the guards manning the main gate at around 5:30 am," said Kenya Police Chief Joseph Boinnet.
"The gunmen shot indiscriminately while inside the university compound."
The sprawling campus, on the outskirts of the garrison town, has both teaching areas as well as residential blocks.
The university, a constituent college of Moi University, has several hundred students from different parts of Kenya.
The number of teachers and students trapped inside the campus was unclear as gunfire and explosions were heard coming from the site.
"Police engaged the gunmen in a fierce shootout, (but) the attackers retreated and gained entry into one of the hostels," Mr Boinnet said, adding that reinforcements had arrived and were "flushing out the gunmen".
GUARDS SHOT DEAD
A witness, Ahmed Nur, said he saw the bodies of two university guards, shot by the attackers.
The Kenya Red Cross, quoting local health officials, said that 30 people had been taken to hospital, "the majority" with gunshot wounds.
Kenya has been hit by a wave of grenade and gun attacks, often blamed on sympathisers of Somalia's Al-Shabaab Islamist fighters 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.
Kenya's government has been under fire since the September 2013 Al-Shabaab attack on the Westgate shopping mall in Nairobi, in which at least 67 people were killed in a siege involving just four gunmen and which lasted four days.
In June 2014 Al-Shabaab gunmen killed close to 100 people in a series of attacks on the town of Mpeketoni and nearby villages in Lamu County.
In November 2014 Al-Shabaab 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.
Students in Garissa on Thursday reported seeing up to four masked gunmen entering the university compound before dawn.
The area surrounding the university was sealed off by the Kenya security forces and the army called in.