Two gunmen were killed at American University of Afghanistan in Kabul early Thursday, hours after an attack launched against the institution, authorities said.
The attack began Wednesday evening when a car bomb was detonated at the front gate of the university and multiple gunmen forced their way inside, Afghan Interior Ministry spokesman Sediq Sediqqi said.
Special forces responded and engaged the gunmen, and killed two attackers, a senior security official at the scene said at around 4 a.m. local time (7:30 p.m. Wednesday ET).
More than 30 students and staff have been rescued, the security official said. A witness who escaped the attack said he what appeared to be at least one person shot dead.
Several special forces were killed and injured and a search continued for any other possible attackers, the senior security official said.
Dejan Panic, the program director at Kabul's Emergency Hospital, told The Associated Press that 18 people wounded in the attack, including five women, had been admitted. He said three were "seriously" wounded, probably from automatic gunfire.
"We have been notified of a complex attack on the American University on Darul-Aman Road," the commander of the Kabul police's quick reaction force told NBC News after receiving reports at about 7:30 p.m. (11:00 a.m. ET).
A senior U.S. defense official said American military troops who are advising the Afghans have been on site at the university but are not taking part in a combat role.
More from NBC News:
Italy Earthquake: Army Mobilized, Dozens Buried in Amatrice
Germany Debates Putting Troops on Streets to Protect Against ISIS
Scenes From Italy's Earthquake: The Ancient Town of AmatriceTurned to Rubble
A student told NBC News that he had just walked out of a class with friends when he heard gunfire and they started running toward the cafeteria. A "massive explosion" threw them to the ground.
"We got up, and in the midst of dust ... kept running to the back of the building and climbed the walls and jumped down on the street," he said, adding that he hurt his back and may have fractured his foot.
Pulitzer Prize-winning photographer Massoud Hossaini tweeted that he was at the university and heard shooting and an explosion:
Hossaini later told NBC News he was inside an English class with other students when a "big explosion" was heard the seemed to come from south of the building.
He went to investigate and saw trees on fire, and a man walking who suddenly raised a gun and pointed it in his direction. Hossaini ducked and went back to the classroom and the students used desks to barricade the door to the second-floor classroom.
Then they heard shooting on the first floor, Hossani said.
"My wife called me from Canada and I just told her that probably I may die here and say goodbye to her," Hossaini said.
"And then, well after some minutes, the attacker came and kicked our class door two times but because there were a lot of, I mean, desks. he couldn't come in."
A grenade was thrown in through a window and detonated inside the classroom, Hossaini said, and he and other students jumped from the window and onto a fallen air conditioning unit after another explosive was thrown into the classroom.
The group then ran through an emergency exit and eventually made it to security forces, passing at least one person who appeared to be shot and who was not moving, he said.
The White House said it was aware of the incident and was monitoring the situation.
U.S. State Department spokeswoman Elizabeth Trudeau condemned the assault on the school.
"An attack on the university is an attack on the future of Afghanistan," she told reporters.
Trudeau said the State Department was in the process of accounting for all mission personnel and working to locate any citizens affected by the attacks.
U.S. National Security Council spokesman Ned Price meanwhile saluted the quick work of Afghan security forces who responded to the attack, and said the United States "condemns in the strongest terms the terrorist attack" on the university.
"We send our thoughts and prayers to the families and loved ones of those killed and our heartfelt wishes for a speedy recovery to those wounded," Price said. "We further reaffirm the support of the United States for the Afghan government and people as they continue to build a more stable, secure, and prosperous Afghanistan."
Earlier this month, five gunmen wearing Afghan military uniforms abducted two professors — an American and an Australian — from American University of Afghanistan. No group has claimed responsibility for the kidnappings, and the whereabouts of the staffers remains unknown.
The five-acre campus opened in 2006 and is Afghanistan's only private, not-for-profit and co-educational university. About 1,700 full- and part-time students are enrolled with undergraduate classes in business, science, political science and law.
In 2008, then-first lady Laura Bush helped to raise $42 million in funding for the school from USAID.