A gunman dressed in black stepped from behind a curtain at the front of a large lecture hall at Northern Illinois University on Thursday and shot 21 people, six of them fatally, then shot and killed himself, said university President John Peters.
"A lot of people were screaming. Everybody started running for the door," said student Zach Seward. "It was just complete chaos."
Four died at the scene, including the shooter, and three later died at a hospital, officials said.
At least 22 people, including the gunman and a graduate student who was teaching an ocean sciences class, were shot, Peters said.
Late Thursday, dozens of students gathered on campus for a candlelight prayer vigil. Video footage showed students comforting one another and a young man playing guitar.
Official school events and classes were canceled until further notice, Peters said.
Seven counseling areas were set up throughout the campus, and hotlines were established.
NIU senior Daley Hamilton, 21, said most students were heading home to their parents. "My parking lot at my apartment is pretty sparse," she told CNN.
She said she and her roommate were planning to leave Friday. "We are really on edge and just kind of want to get out," she said.
Tributes were also surfacing online. A Facebook community called "Pray for Northern Illinois University Students and Families" had more than 14,000 members by late Thursday.
NIU student Amanda Hart Garner posted the school's fight song, including the lyrics: "Free, steadfast, devoted, true/We will always stand by you."
Seven of those wounded in the shooting were listed in critical condition.
Four of the fatalities were female, said Peters.
Most of the injuries are head and chest gunshot wounds, a hospital spokeswoman told CNN.
The gunman started shooting from a stage in the room shortly after 3 p.m. (4 p.m. ET) in Cole Hall, officials said.
Police Chief Donald Grady said authorities do not yet know of a motive.
They know the identity of the gunman but have not released his name, Grady added.
The shooter was a graduate student at NIU in the spring of 2007. Currently he was not enrolled there but, Grady said, "He may have been a student elsewhere."
A preliminary investigation has not uncovered a police record on the gunman, and records showed he had no contact with NIU police while a student there, Peters said.
Gunman 'just started shooting'
Kevin McEnery said he was in the classroom when the gunman, dressed in a black shirt, dark pants and black hat, burst in carrying a shotgun.
"He just kicked the door open, just started shooting," said McEnery, who was in the class at the time. "All I really heard was just people screaming, yelling 'get out.' ... Close to 30 shots were fired."
There are about 162 registered students in the class that met in the large lecture hall.
A student described the classroom as having four exits -- two at the front and two at the rear.
"Witnesses say someone dressed in black came out from behind a screen in the front of the classroom and opened fire with a shotgun," Peters said.
At 3:03 p.m., NIU police responded, and four minutes later, the campus was ordered into "a lockdown situation," Grady said.
At 3:20, an all-campus alert went out via the campus Web site, e-mail, voice mail, the campus crisis hotline, the news media and various alarm systems, he said.
"The message basically was: There's a gunman on campus, stay where you are; make yourself as safe as possible," he said.
Rosie Moroni, a student at the school, told CNN she was outside Cole Hall near the King Commons when she heard shots coming from the classroom she was heading to.
The shot was followed by "a lot of people screaming," then people ran out the doors yelling, "He's got a gun, call 911," she said.
"It was complete chaos. It's very scary here right now."
By 4 p.m., DeKalb police had swept the area "and determined there was only one gunman" and that he was dead.
Grady said the man used three guns: a shotgun, a Glock handgun and a small-caliber handgun, and was still on the stage when he turned one of the guns on himself. The small-caliber handgun had not yet been recovered, he said.
The gunman started shooting with a shotgun, then switched to a handgun, said Grady.
Security around campus was increased in December when police found threats scrawled on a campus bathroom wall that included racial slurs and references to last April's Virginia Tech shootings.
One of the threats said "things will change most hastily" in the final days of the semester.
Peters said there is no evidence that points to a link between the December incident and Thursday's shooting.
Grady said it was unlikely authorities could have prevented Thursday's tragedy.
"As much as we do, it's unlikely that anyone would ever have the ability to stop an incident like this from beginning," he said.
Illinois Gov. Rod Blagojevich declared a state of emergency, which will open the governor's disaster fund to reimburse local government entities for "extraordinary expenses related to the response in NIU DeKalb" and will allow the state Emergency Management Agency to provide assistance, the governor's office said in a statement.
Eighteen victims were taken to Kishwaukee Community Hospital, its Web site said.
Of those, seven were in critical condition and were flown to other hospitals. One fatality, a male, was confirmed -- but was not the gunman, the hospital said. Two were admitted, and eight others were discharged.
Nate Llewellyn, a spokesman for Advocate Good Samaritan, said it had received two female patients and one male: Nineteen-year-old Unnum Rahman was in serious condition and in surgery after receiving gunshot wounds to her right eye and arm; Maria Ruiz Santana was in surgery and in critical condition; an unidentified male shooting victim was in surgery and in critical condition.
The 113-year-old school is 65 miles west of downtown Chicago and has an enrollment of more than 25,000. The campus covers 755 acres. See a map of where the shooting took place