Thirty-three people were killed Monday on the campus of Virginia Tech in what appears to be the deadliest shooting rampage in American history, according to federal law enforcement officials. Many of the victims were students shot in a dorm and a classroom building.

“Today, the university was struck with a tragedy that we consider of monumental proportions,” said the university’s president, Charles Steger. The campus police chief said this evening that 15 people were wounded by the gunman, although there were other reports of higher numbers of injuries.

Witnesses described scenes of mass chaos and unimaginable horror as some students were lined up against a wall and shot. Others jumped out of windows to escape, or crouched on floors to take cover.

The killings occurred in two separate attacks on the campus in Blacksburg, Va. The first took place around 7:15 a.m., when two people were shot and killed at a dormitory. More than two and a half hours later, 31 others, including the gunman, were shot and killed across campus in a classroom building, where some of the doors had been chained. Victims were found in different locations around the building.

The first attack started as students were getting ready for classes or were on their way there. The university did not evacuate the campus or notify students of that attack until several hours later.

As the rampage unfolded, details emerged from witnesses describing a gunman going room to room in a dormitory, Ambler Johnston Hall, and of gunfire later at Norris Hall, a science and engineering classroom building. When it was over, even sidewalks were stained with blood. Among those dead was the gunman, whose body was found along with victims in Norris Hall.

“Norris Hall is a tragic and sorrowful crime scene,” said the campus police chief at Virginia Tech, Wendell Flinchum.

Chief Flinchum said the gunman took his own life. He said at a televised news briefing Monday evening that the police had a preliminary identification of the suspected gunman but were not yet ready to release it. He said the gunman was not a student.

According to a federal law enforcement official, the gunman did not have identification and could not be easily identified visually because of the severity of an apparently self-inflicted wound to the head. He said investigators were trying to trace purchase records for two handguns found near the body.

At televised news conferences Monday afternoon and Monday evening, Chief Flinchum and Mr. Steger tried to explain why authorities did not act to secure the rest of the campus immediately after the first shooting.

Chief Flinchum said that initially officials thought that the shooting was “domestic,” suggesting that it was between individuals who knew each other, and isolated to the dormitory. He said the campus was not shut down after the first shooting because authorities thought that the attacker may have left the campus, or even the state.

“We knew we had two people shot,” he said. “We secured the building. We secured the crime scene.” He later added: “We acted on the best information we had at the time.”

Chief Flinchum said officers initially began investigating a “person of interest” as a result of the dormitory shootings. The person, a man, was described as a friend of one of the dorm victims, but Chief Flinchum said the police had not detained him.

Image Emergency workers carried people from Norris Hall on the campus of Virginia Tech in Blacksburg, Va., on Monday after a gunman killed 32 people. Credit... Alan Kim/The Roanoke Times, via Associated Press

At 9:45, the police got another 911 call about shootings at Norris Hall, just as university officials were meeting to discuss the first shootings. “We were actually having a meeting about the earlier shootings when we learned that another shooting was under way,” Mr. Steger told reporters Monday night. By the time officers arrived, the shooting had stopped and the gunman had killed himself, the chief said.

The police appeared to believe that the two shootings were related, but said they could not confirm that until they had the results of a ballistics analysis.

A parent of one student, Elaine Goss, said her son Alec Calhoun, a junior engineering major, jumped out a second-story window in Norris Hall when the gunman entered his classroom.

She said that she first spoke to her son, “I couldn’t understand him; it was like gibberish.”

“It took a while to figure out shootings, lots of shootings, and that his whole class had jumped out the window,” she said.

Ms. Goss said her son hurt his back in the jump and went to a hospital.

Another student, Jessica Paulson, said she was on the fourth floor at Ambler Johnston Hall when the shootings occurred on the opposite side of the floor.

“You could hear two shots,” one followed shortly by a second, recounted Ms. Paulson, who was preparing to go to an early class. Neither she nor most of the other students nearby understood what had happened until several hours later.

At least 17 Virginia Tech students were being treated for gunshot wounds and other injuries at Montgomery Regional Hospital, and four of them were in surgery, according to a hospital spokesman. At Lewis-Gale Medical Center in Salem, Va., four students and a staff member were treated for injuries. Two were in stable condition, and the conditions of the other three were described as “undetermined.”

Officials said there may have been more injured and taken to other medical facilities.

The university has more than 25,000 full-time students on a campus that is spread over 2,600 acres.

The atmosphere on the Virginia Tech campus was desolate and preternaturally quiet by Monday afternoon. Students gathered in small groups, some crying, some talking quietly and others consoling each other.

Some students complained that they had not been notified of the first shooting on campus for more than two hours.

Kirsten Bernhards, 18, said she and many other students had no idea that a shooting had occurred when she left her dorm room in O’Shaughnessy Hall shortly before 10 a.m., more than two hours after the first shootings.

“I was leaving for my 10:10 film class,” she said. “I had just locked the door and my neighbor said, ‘Did you check your e-mail?’ ”

The university had, a few minutes earlier, sent out a bulletin warning students about an apparent gunman. But few students seemed to have any sense of urgency.

Ms. Bernhards said she walked toward her class, preoccupied with an upcoming exam and listening to music on her iPod. On the way, she said, she heard some loud cracks, and only later concluded they had been gunshots from the second round of shootings.