BLACKSBURG, Va. — A gunman opened fire in a dorm and classroom at a college in Virginia on Monday, killing at least 31 people in the deadliest campus shooting in U.S. history. The gunman also was killed, and more than a dozen other people were injured.

“Today the university was struck with a tragedy that we consider of monumental proportions,” said Charles Steger, president of Virginia Polytechnic Institute and State University in Blacksburg, in southwest Virginia. “The university is shocked and indeed horrified.”

The shootings spread panic and confusion at the college, which is popularly known as Virginia Tech. Witnesses reporting students jumping out the windows of a classroom building to escape the gunfire.

Authorities that the gunman killed himself after he shot nearly 50 people at two locations on campus. Twenty-one were confirmed dead, NBC News reported. At least 28 others were injured, at least four of whom were in critical condition, NBC affiliate WSLS-TV in nearby Roanoke reported, quoting local hospital officials.

The name of the gunman, whom witnesses described as a young Asian man wearing a maroon cap and a black leather jacket, was not released. It was not known if he was a student.

The man did not appear to be shooting at random, NBC News’ Pete Williams reported, quoting federal law enforcement officials. He appeared to have specifically targeted the two locations, a co-ed dormitory and a classroom in an engineering building.

Officials told Williams that they were investigating reports that the gunman may have chained the doors of the classroom closed so his victims could not escape.

No terrorism evidenceThe university reported shootings at opposite sides of the 2,600-acre campus, beginning at 7:15 a.m. ET at West Ambler Johnston, a co-ed residence hall that houses 895 people.

The campus was under lockdown, with students asked to stay indoors and away from the windows, when authorities got word of gunfire about two hours later at Norris Hall, an engineering building.

Some but not all of the dead were students. One student was killed in the dorm, and the others were killed in the classroom, said Virginia Tech Police Chief W.R. Flinchum.

FBI spokesman Richard Kolko in Washington said there was no immediate evidence to suggest it was a terrorist attack, “but all avenues will be explored.”

Law enforcement officials said the gunman carried two weapons, a 9-mm handgun and a 22-caliber gun, Williams reported.

Until Monday, the deadliest mass shooting in U.S. history was in Killeen, Texas, in 1991, when George Hennard drove his pickup into a Luby’s Cafeteria and shot 23 people to death, then himself.

The deadliest previous campus shooting in U.S. history took place in 1966 at the University of Texas, where Charles Whitman climbed to the 28th-floor observation deck of a clock tower and opened fire. He killed 16 people before he was gunned down by police. In the Columbine High School bloodbath near Littleton, Colo., in 1999, two teenagers killed 12 fellow students and a teacher before taking their own lives.

After Monday’s shootings at Virginia Tech, all entrances to the campus were closed.

The university set up a meeting place for families to reunite with their children at the Inn at Virginia Tech. It also made counselors available and planned a convocation for Tuesday at the Cassell Coliseum basketball arena.

“There’s just a lot of commotion. It’s hard to tell exactly what’s going on,” said Jason Anthony Smith, 19, who lives in the dorm where shooting took place.

Aimee Kanode, a freshman from Martinsville, said the shooting happened on the fourth floor of West Ambler Johnston dormitory, one floor above her room. Kanode’s resident assistant knocked on her door about 8 a.m. to notify students to stay put.

“They had us under lockdown,” Kanode said. “They temporarily lifted the lockdown; the gunman shot again.

Bomb threats last two weeksPolice said there had been bomb threats on campus over the past two weeks but that they had not determined a link to the shootings.

Dana Perino, a White House spokeswoman, said President Bush was horrified by the rampage and offered his prayers to the victims and the people of Virginia.

“The president believes that there is a right for people to bear arms, but that all laws must be followed,” Perino said.

It was second time in less than a year that the campus was closed because of a shooting.

In August, the opening day of classes was canceled and the campus was closed when an escaped jail inmate allegedly killed a hospital guard off campus and fled to the Tech area. A sheriff’s deputy involved in the manhunt was killed on a trail just off campus.