(CNN) -- The 20-year-old student accused in a stabbing rampage at a Texas college campus told investigators he had fantasies of killing people and had planned the attack, sheriff's officials said late Tuesday.
Dylan Quick, 20, was charged with three counts of aggravated assault with a deadly weapon after the stabbings, said Donna Hawkins, an official with the Harris County Prosecutor's Office.
"According to the statement the suspect voluntarily gave investigators, he has had fantasies of stabbing people to death since he was in elementary school," a statement from the Harris County Sheriff's Office said. "He also indicated that he has been planning this incident for some time."
Quick used "a razor-type knife" to stab victims at the Lone Star College's CyFair campus Tuesday, the sheriff office's statement said.
Fourteen people were injured in the attack, officials said. Two of them remained hospitalized in critical condition late Tuesday, said Kathryn Klein, a spokeswoman for the Memorial Hermann Texas Trauma Institute.
Witnesses of the attack at the campus northwest of Houston described a chaotic scene. Bleeding victims collapsed to the ground. Many students and teachers ran for cover. Some sprang into action, chasing after the suspect and helping the wounded.
Cassie Foe was in the school's nursing lab when she heard a scream coming from the hallway.
Moments later, the nursing student put her training into action, placing pressure on a wound in a stabbing victim's neck as an attacker went on a rampage at the Lone Star College's CyFair campus.
"It just seemed like he was just going around, basically getting whoever was more open and easiest for him to reach," Foe told CNN's Anderson Cooper on Tuesday.
Steven Maida said he saw so many people swarming that he thought it was a campus tour. Then, he saw them running and heard someone say: "My friend's been stabbed."
Maida said he saw blood on a stairway and several injured victims. One wounded woman had a hole in her throat, one had a hole in her cheek and another victim had a stab wound in the back of his head, Maida said.
"I just took off downstairs running," he said.
Finding the attacker was his goal, he said. Maida told CNN he was among a group of students that chased the suspect, tackled him and pinned him down until authorities arrived.
"I couldn't run the other way like everyone else was," he said.
Authorities could not be reached immediately to confirm Maida's account. Earlier Tuesday, Harris County Sheriff's Deputy Thomas Gilliland said authorities received an initial report that the suspect had been wrestled to the ground by a student before campus police arrested him.
Garcia said a call came in to 911 Tuesday morning describing a "male on the loose stabbing people" at the school.
At least one injured victim had what appeared to be the blade of a box cutter or an X-Acto knife sticking out of her cheek, student Melody Vinton told CNN affiliate KHOU.
Vinton said she had just left her chemistry class when she saw the attacker stabbing people, aiming at their necks and faces.
Soon, she was trying to help victims, ripping a paper towel dispenser off a bathroom wall to get enough paper to help stem the bleeding.
"I turned around and there was just blood. Just blood dripping down the stairs, all over the floor, all over everyone's towels on their necks, just a lot of blood," told KHOU. "There's no humanity in that. Just to see another human being do that was more traumatic than anything."
Another student, 19-year-old Maya Khalil, snapped photos of the chaos as it unfolded, posting pictures on Twitter that showed a bandaged student on a stretcher and police and paramedics swarming the scene.
"It was really scary," she told CNN.
Most of the victims had lacerations in their head and neck areas, said Robert Rasa, a spokesman for the CyFair Volunteer Fire Department.
"We were literally going from building to building, room to room, looking for patients, setting up triage," he said.
The school was on lockdown Tuesday afternoon while authorities combed the campus to ensure no other injured people or attackers were there, Harris County sheriff's spokesman Alan Bernstein said.
While authorities investigated, teachers and students huddled together in locked rooms, said Marianna Sviland, a teacher at the college who was in a faculty workroom at the time of the stabbing.
"Outside the window, I saw cops running around, I saw students running and I realized something was going on," she said. "It was scary."
By 2 p.m. (3 p.m. ET), students and staff were allowed to leave campus, Sviland said.
Details about the victim's injuries were unclear Tuesday afternoon.
Bernstein said it wasn't clear whether all of the injured people were stabbed.
"It's possible other people were running away" and became injured that way, he said.
Four injured victims "were in a dire enough situation that they were taken out on helicopters," Bernstein said.
"I do believe the confrontation was limited to a few (classrooms) or just one classroom -- not anybody roaming around and getting into a large number of areas," Bernstein said.
The school posted a warning on its website: "Stay away from the area. Seek shelter in a secure location until the incident is resolved."
The campus was scheduled to reopen for classes Wednesday morning. Officials said counselors would be speaking with faculty and students.
Tuesday's incident comes more than two months after three people were wounded in a shooting at a different Lone Star College campus -- the North Harris campus in Houston.
CNN's Dave Alsup, Chandler Friedman, Jason Morris, Ed Lavandera, Greg Botelho, Paul Caron, Chuck Johnston, Ashley Fantz and Jason Hanna contributed to this report.