(CNN) -- A lone gunman is dead after police said he killed at least 21 people Monday during shootings in a dorm and a classroom at Virginia Tech -- the deadliest school attack in U.S. history.
Government officials told The Associated Press that the death toll had grown to 31, including the gunman. CNN is working to confirm the report.
It was not clear if the gunman was killed by police or if he took his own life.
"Some victims were shot in a classroom," university police Chief Wendell Flinchum said during a news conference in Blacksburg.
Police believe there was only one gunman, Flinchum said. (Watch the police chief explain where bodies were found )
Spokespersons for hospitals in Roanoke, Christiansburg, Blacksburg and Salem told CNN that they were treating 29 people from the shootings.
Sharon Honaker with Carilion New River Medical Center in Christiansburg said one of the four gunshot victims being treated there was in critical condition.
"Today the university was struck with a tragedy that we consider of monumental proportions," said university President Charles Steger. "The university is shocked and indeed horrified." (Map of Blacksburg)
The killings mark the deadliest school shooting in U.S. history, surpassing attacks at Columbine High School in 1999 and at the University of Texas in 1966.
One person was killed and others were wounded at multiple locations inside a dormitory about 7:15 a.m., Flinchum said. Two hours later, another shooting at Norris Hall, the engineering science and mechanics building, resulted in multiple casualties, the university reported. (Campus map)
The first reported shooting occurred at West Ambler Johnston Hall, a coed dormitory that houses 895 students. The dormitory, one of the largest residence halls on the 2,600-acre campus, is located near the drill field and stadium.
Amie Steele, editor-in-chief of the campus newspaper, said one of her reporters at the dormitory reported "mass chaos."
The reporter said there were "lots of students running around, going crazy, and the police officers were trying to settle everyone down and keep everything under control," according to Steele. (Watch police, ambulances hustle to the scene )
Kristyn Heiser said she was in class about 9:30 a.m. when she and her classmates saw about six gun-wielding police officers run by a window.
"We were like, 'What's going on?' Because this definitely is a quaint town where stuff doesn't really happen. It's pretty boring here," said Heiser during a phone interview as she sat on her classroom floor.
Student reports 'mayhem'
Student Matt Waldron said he did not hear the gunshots because he was listening to music, but he heard police sirens and saw officers hiding behind trees with their guns drawn.
"They told us to get out of there so we ran across the drill field as quick as we could," he said.
Waldron described the scene on campus as "mayhem." (Watch a student's recording of police responding to loud bangs )
"It was kind of scary," he said. "These two kids I guess had panicked and jumped out of the top-story window and the one kid broke his ankle and the other girl was not in good shape just lying on the ground."
Madison Van Duyne said she and her classmates in a media writing class were on "lockdown" in their classrooms. They were huddled in the middle of the classroom, writing stories about the shootings and posting them online.
The university is updating its more than 26,000 students through e-mails, and an Internet webcam is broadcasting live pictures of the campus.
The shootings came three days after a bomb threat Friday forced the cancellation of classes in three buildings, WDBJ in Roanoke reported. Also, the 100,000-square-foot Torgersen Hall was evacuated April 2 after police received a written bomb threat, The Roanoke Times reported.
Last August, the first day of classes was cut short by a manhunt after an escaped prisoner was accused of killing a security guard at a Blacksburg hospital and a sheriff's deputy.
After the Monday shootings, students were instructed to stay indoors and away from windows, police at the university said.
"Virginia Tech has canceled all classes. Those on campus are asked to remain where they are, lock their doors and stay away from windows. Persons off campus are asked not to come to campus," a statement on the university Web site said.
The university has scheduled a convocation for 2 p.m. ET Tuesday.
Before Monday, the deadliest school shootings came in 1966 and 1999.
In the former, Charles Joseph Whitman, a 25-year-old ex-Marine, killed 13 people on the University of Texas campus. He was killed by police.
In 1999, 17-year-old Dylan Klebold and 18-year-old Eric Harris -- armed with guns and pipe bombs -- killed 12 students and a teacher before killing themselves at Columbine High School in Littleton, Colorado.