Gunmen from the militant Islamist group al-Shabab have killed at least 15 people and taken students hostage at a university in north-eastern Kenya.
Reports say 65 others were wounded when gunmen stormed the campus in Garissa. The government says troops have killed two attackers but fighting is ongoing.
Over 500 students are unaccounted for, but the number of hostages is unclear.
Al-Shabab, a Somali militant group linked to al-Qaeda, said it was holding Christians hostage and freeing Muslims.
Hostages from the two groups had been separated, and 15 of the Muslims had already been released, a spokesman for al-Shabab told the BBC.
Gunfire could be heard at the university, as the interior ministry said forces were "intensifying" the rescue operation.
The Kenyan government has named Mohamed Kuno, a high-ranking al-Shabab official, as the mastermind of the attack. It placed a bounty of $217,000 (£140,000) on him.
A BBC Somali Service reporter says Mohamed Kuno was headmaster at an Islamic school in Garissa before he quit in 2007. He goes by the nickname "Dulyadeyn", which means "long-armed one" in Somali.
'Shot on the spot'
The gunmen reportedly ordered students at Garissa College University to lie down on the floor, but some of them escaped.
"It was horrible, there was shooting everywhere," student Augustine Alanga told the BBC's Newsday programme.
He said it was "pathetic" that the university was only guarded by two police officers.
Student Collins Wetangula said when the gunmen entered his hostel he could hear them opening doors and asking if the people inside were Muslims or Christians, the AP news agency reports.
"If you were a Christian you were shot on the spot. With each blast of the gun I thought I was going to die," he said.
About five masked gunmen are said to have stormed the university.
Kenya's Interior Minister Joseph Nkaissery said one of the militants had been killed as he tried to flee. The ministry later tweeted that two attackers were killed by security forces.
Out of 815 students, 533 had not yet been accounted for, Mr Nkaissery said.
It is not clear how many students in total were on the premises at the time of the attack.
However, the Kenya National Disaster Operation Centre said all staff at the university had been accounted for.
Kenyan officials say security forces have isolated the gunmen in a single building at the university and are trying to flush them out.
Kenyan President Uhuru Kenyatta offered his condolences to families of the victims.
He ordered "urgent steps" to ensure police recruits could begin training immediately. "We have suffered unnecessarily due to shortage of security personnel," he said.
At the scene: Bashkas Jugsooda'ay, BBC Africa, Garissa
I can hear gunfire from inside the campus. Ambulances are rushing in and out with the wounded.
One teacher told me some students managed to run away from the gunfire, and came to her house early in the morning to seek shelter.
But a huge crowd has gathered outside the house, mostly of people who are worried that friends and relatives may be still trapped inside.
Some of them are trying to enter the campus but the security forces are holding them back. Troops have also surrounded the main hospital, restricting public access to it as medical staff battle to cope with the wounded.
The university opened in 2011 and is the only higher education institution in the area.
The BBC's Anne Soy in Nairobi says that because of its proximity to Somalia, Garissa is an easy target for al-Shabab militants and there have been several attacks in the past.
She says that the UK and Australia issued alerts this week warning of potential terror attacks in parts of the country, including Garissa.
There has also been a specific alert for universities in the country.
George Musamali, a security specialist and former officer in Kenya's paramilitary police, told the BBC the authorities had "failed the students" by being poorly prepared despite intelligence of an attack.
Al-Shabab has carried out a number of attacks in Kenya since 2011, when Kenyan troops were sent to Somalia to help fight the militant group there.
Recent al-Shabab attacks in Kenya
December 2014: Gunmen kill 36 quarry workers in Mandera after separating Muslims and non-Muslims
November 2014: Gunmen kill 28 non-Muslim passengers during an attack on a bus in Mandera
September 2013: Four gunmen take over the Westgate shopping mall in the Nairobi, killing 67 people