Image caption Seevakumaran's roommates say he had not appeared violent in the past

A US university student may have been planning a massacre before he killed himself instead, authorities have said.

James Seevakumaran, 30, was found with explosives and firearms in his room at the University of Central Florida.

Officials said he pointed a gun at another student, who called the police, before pulling a fire alarm and shooting himself.

Hundreds of students were evacuated early on Monday but classes were held after the explosives were removed.

The incident occurred as the US holds an emotionally charged debate about how to curb its gun violence epidemic.

At a news conference on Monday, authorities said writings found in his dorm room suggested Seevakumaran was planning a massacre on the scale of the horrific US school and university shootings of recent years.

Campus Police Chief Richard Beary said he believed Seevakumaran shot himself as police answered the emergency call shortly after midnight on Monday.

"His timeline got off," Chief Beary said. "We think the rapid response of law enforcement may have changed his ability to think quickly on his feet."

Four explosive devices were found in a back pack, the police chief added.

Investigators think Seevakumaran may have triggered a fire alarm in the building in order to push students outside into the open so he could massacre them, Chief Beary said.

His roommates told investigators he had at times been anti-social but had not displayed violent tendencies.

But a spokesman said the university, based in Orlando, had been in the process of removing him from his dorm after he failed to register for classes.