Shebab gunmen on Thursday seized Christian hostages at a Kenya university near the border with Somalia, in an pre-dawn attack that killed at least 15 people and wounded scores more.
A spokesman for Somalia's Al-Qaeda-linked Shebab, 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 Shebab 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 Shebab."
"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."
Kenya's interior ministry also said "one suspected terrorist" had been arrested 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 the Shebab.
"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 Boinet. "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 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, however the attackers retreated and gained entry into one of the hostels," Boinet said, adding that reinforcements had arrived and were "flushing out the gunmen."
A witness, Ahmed Nur, said he saw the bodies of two university guards, shot by the attackers.
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 Shebab 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. On Wednesday, just hours before the attack in Garissa began, President Uhuru Kenyatta said Kenya "is safe as any country in the world".
Kenya's government has been under fire since the September 2013 Shebab 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 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 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.
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.