(CNN) -- A gunman shot and killed another man Tuesday inside Purdue University's electrical engineering building, spurring worried students to scramble into the bitter cold outside for safety.
The Indiana school's police chief said that the suspect appeared to have had just one target in mind. He left the building right after the shooting, and a city police officer arrested him.
"This appears to be an isolated and intentional act," Purdue Police Chief John Cox said. "...The victim appeared to have been targeted by the suspect, and it was no more and no less than that."
Cox identified the victim as Andrew Boldt, a 21-year-old senior from West Bend, Wisconsin, who also worked at the school as a teaching assistant.
The suspect is Cody Cousins, a 23-year-old student in Purdue's college of engineering who now is "booked on a preliminary charge of murder," according to the police chief. By 6 p.m. West Lafayette police had executed a search warrant on Cousins' home, with city police Chief Jason Dombkowski saying his officers had "previous contact with the suspect (for what) I believe (was) an alcohol offense."
Authorities have not explained why Boldt might have been killed, nor have they detailed his relationship with the suspect, including whether he was a teaching assistant in one of Cousins' classes. Nor have they described the type of gun used in the crime.
CNN first learned about the incident on Twitter.
The noontime shooting rattled many people's nerves in and around the West Lafayette campus of Purdue, where about 30,000 undergraduates attend.
"You hear about school shootings all the time, but you never expect it to happen where you live," said CNN iReporter Jeff Ooms, who works a few blocks away from what's known as the EE Building and went to the scene. "Everyone was just confused and shocked."
Cox said some on the scene claimed to hear "four to five shots fired." One of those inside the building was Ben Snyder, a Purdue senior from Fort Wayne. According to video posted to IndyStar.com, he and others inside the engineering building believed they heard two gunshots and immediately knew something was up.
"We heard it immediately and everyone was like, 'OK, let's go."
He recalled "officers coming in fast," including four on the building's second floor armed with what looked like assault rifles, and saw several people "getting handcuffed" and one man "with blood on his hands."
In another video interview on the same website, sophomore Kirk Choquette said he first heard cries of "get down, get down, get down" after leaving a bathroom and didn't know what to make of it.
After he returned to a large lecture hall, Choquette said, "a cop came in and said, 'Get out, get out, everyone get out of the building.'"
David Hook had a similar experience. He didn't hear gunshots but heard shouting outside his lecture hall, which was in a building connected to the one where the bloodshed occurred.
"Originally, I just thought it was just people being loud," the 20-year-old Hook told CNN. "When I heard (shouting) the second time, I thought something was probably going on."
Eventually, "someone came in and yelled to evacuate the building and then an alarm went off," he added.
"I walked out," Hook said of the chilling scene outside -- and not just because the wind chill dipped below zero Tuesday outside -- "and there were police cars everywhere."
Cox commended the quick response by officers, as well as West Lafayette police and school authorities, saying "everyone did exactly what they should have done."
The police chief added: "You train and plan, and train and plan for one of these incidents and hope it never happens. But unfortunately, it did."
The school sent text messages about the shooting to students, asking them to take shelter where they were. That request was lifted by 1:30 p.m., though the electrical engineering building still was closed so police could investigate, school spokeswoman Liz Evans said.
Evans said then that "the rest of campus is open" and classes were under way.
But a few hours later, Purdue Provost Tim Sands announced classes for the rest of Tuesday and all of Wednesday were canceled. An 8 p.m. candlelight vigil has been planned on the heels of a shooting that unnerved many in what Cox called "one of the safest communities in the Big Ten."
Sands said details about counseling to those grieving or trying to make sense of the violence will be announced at that vigil. While authorities stressed they don't believe there is any continued threat to students, faculty or staff, the provost said that the Purdue community will need time to heal.
"Of course, it's not over," Sands said. "It's just beginning."