Then came the smoke, fire and confusion.
A third attacker was killed when he detonated an explosives-laden car Wednesday night in front of the university wall, Mujahid said.
"It was a huge explosion," Ahmad, 28, a political science major, told CNN. "The windows of our class just shattered."
Ahmad and his classmates were trapped in a corridor outside their classroom before a security guard led them to an emergency exit. In their haste to get out, students tripped, fell and clambered over each other.
And still the nightmare wasn't over. "We heard heavy firing," he recalled. He said he's still in shock. "It was so close we thought they were right behind us." He said he saw one injured woman, a fellow student, her face a mask of blood.
Neighbors came out of their houses, he said, adding to the cacophony of screams. They told the students to get away from the area, lest they become targets themselves.
Night of terror
The 13 killed included seven students, three police, two security guards and a doorman. Thirty students were injured in the attack, for which no group has claimed responsibility.
Around 750 students were on campus at the time, the police spokesman said. Two professors, an American and an Australian, were abducted from the university earlier this month
. Their whereabouts remain unknown. Ahmad said that after the kidnappings, students had been drilled in how to respond to a potential attack.
"The university administration is working closely with relevant authorities to assess the damage and to ensure that everyone is accounted for," a statement from the institution read.
"'My number one priority at this point is the safety and security of all faculty staff, and students," Mark English, the university's president, said in the statement.
The US Embassy in Kabul condemned the "heinous" attack on the university.
"We remain strongly committed to the people of Afghanistan who are dedicated to establishing lasting peace and security and building the brightest possible future for their children," Ambassador P. Michael McKinley said.
'An attack on education'
The gunmen detonated explosives and fired guns, witnesses said, causing some students and faculty to flee. Others hid inside buildings, a senior US State Department official told CNN.
The first blast occurred at 7:50 p.m. local time when students were gathering and eating together.
Ahmad described it as "an attack on education."
The State Department said Thursday it had no reports of US citizens being killed or seriously injured in the attack.
"At the same time our thoughts are with the families and friends of Afghan students, staff and security personnel who lost their lives," State Department spokeswoman Elizabeth Trudeau said.
Despite the name of the school, few Americans study there, a senior State Department official said, though a number of Americans are on the faculty. The school is regarded as a symbol of cooperation between Afghanistan and the United States.
'Everyone started screaming'
Ahmad Samin said he was teaching a chemistry class Wednesday evening when the assailants struck.
The attackers opened fire and detonated explosives on the campus. Quickly, the lights went out in Samin's classroom.
"It was very dark, (and) everyone was running. Everyone started screaming," said Samin, who is a US citizen. "(It) was the scariest moment in my life. I was just thinking about my son and daughter who are in (the United States)."
Amid black smoke, he took off running with the students and other faculty, and "the smoke entered my mouth" as he fled, he said.
'Enormous and harsh sound'
Witnesses described a chaotic scene.
A student, who asked to remain anonymous out of fear for his safety, told CNN he was attending a lecture class when he heard a "very enormous and harsh sound" -- an explosion roughly 50 meters from his classroom.
"Everyone looked around the room looking for an escape," he said. "We have an emergency exit area in the corner of the campus. It's like a gate that opens when people need to get out of campus. Everyone was running out of there."
He heard gunfire as they ran, then a second explosion. Both explosions came from the school's entrance, he said.
"People were screaming for help. Everyone was screaming," he said.
He saw several people injured -- some from glass, others by bullets. A guard had injuries that appeared to be a result of one of the explosions, he said.
The student said he had heard from friends trapped in three buildings.
Bilal Sawary, a journalist in Kabul, said he'd heard from several people on campus.
"One of my family members who was there told me the attackers had maps, they were drinking Red Bulls, clearly aiming to stay as long as they could and some of them were tossing hand grenades," he said.
A rash of kidnappings and Taliban bombings have heightened security fears in the Afghan capital.
Many countries, including the United States and United Kingdom, have longstanding travel advisories against all but essential travel to Afghanistan because of the security situation.
"We are closely watching the situation at the American University in Kabul," a U.S. defense official told CNN on Wednesday. "A small number of advisers from the Resolute Support Mission
is currently assisting Afghan forces as they respond. These advisers are not in a combat role; they are advising their Afghan counterparts."