Student Augustine Alanga: "They were shooting randomly"
At least 70 hostages have been killed in an attack by al-Shabab Islamist militants on a university in north-eastern Kenya, officials say.
At least 79 were injured while more than 500 students were rescued from the Garissa University College campus, disaster management officials said.
Interior Minster Joseph Nkaiserry said four of the attackers had been killed, and security operations were ongoing.
An overnight curfew has been issued in parts of the country.
Four counties near the Kenya-Somalia border, Garissa, Wajir, Mandera and Tana River, would have dusk to dawn curfews imposed, disaster management officials said.
Nine students were critically injured and airlifted to the capital Nairobi for medical treatment, they added.
Mr Nkaiserry said that "90% of the threat [had] been eliminated", but security forces were "mopping up the area" in case more gunmen were on the campus.
About five masked gunmen are said to have stormed the university early on Thursday morning.
The scene of the siege
1. Militants enter the university grounds, two guards are shot dead
2. Shooting begins within the campus
3. Students attacked in their classrooms while preparing for exams
4. Gunmen believed isolated in the male dormitories
5. Some students make an escape through the fence
UN Secretary-General Ban Ki-moon condemned what he called a "terrorist attack" and said the UN was ready to help Kenya "prevent and counter terrorism and violent extremism".
The Kenyan government earlier 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.
President Uhuru Kenyatta: "This is a moment for everyone... to be vigilant"
Earlier, al-Shabab told the BBC its members were holding Christians hostage and freeing Muslims.
The gunmen reportedly ordered students to lie down on the floor, but some of them escaped.
Student Augustine Alanga told the BBC's Newsday programme: "It was horrible, there was shooting everywhere."
He said it was "pathetic" that the university was only guarded by two police officers.
The government has placed a $217,000 bounty on Mohamed Kuno
Security forces have laid siege to the area around the university
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.
Al-Shabab says it attacked the university because it is at war with Kenya, the BBC's Africa editor Mary Harper reports.
Kenyan troops entered Somalia in October 2011 in an effort to stop the Islamists from crossing the long, porous border between the two countries and kidnapping people - but their presence achieved the opposite effect, provoking al-Shabab to increase its activity in Kenya, our correspondent adds.