One Kenyan student was killed and 141 injured in a stampede Sunday on the campus of the University of Nairobi when students mistook several accidental explosions for an extremist attack, according to an official.

One male third-year student was killed in the crush of students, Peter Mbithi, Vice Chancellor of the University of Nairobi, told The Associated Press. The injured students have been taken to hospitals for treatment, he said.

He said an electrical transformer exploded and students thought it was an attack by Islamic extremists like the April 2 attack by Somalia's al-Shabab rebels on Kenya's Garissa University College in which 148 people were killed.

Describing the Nairobi incident, Mbithi said: "It was around 5 a.m. and the transformer at the campus exploded about four or five times which made students mistake it for an attack," said Mbithi. "Most of them jumped out of their hostels thinking it was an al-Shabaab attack ... There was no attack but because of what happened in Garissa the other day they mistook it for an attack."

Mbithi said many students were injured when they jumped from upper floors of their dormitories.