-- A deadly attack on the American University of Afghanistan in Kabul has ended, according to a government spokesperson.
General Abdul Rahman Rahimi, Kabul's police chief, said early Thursday that 12 people were killed. Of the 12 killed, he said 7 were students, 3 were police officers and 2 were American University of Afghanistan guards.
Rahimi said 35 students and 9 police officers were injured.
There were no immediate claims of responsibility for the attack. Although suspicion falls on the Taliban, the group's spokesman, Zabihullah Mujahid, would only tell the media that the group is "investigating," according to The AP.
Three attackers were involved in the attack, Rahimi said. The first attacker detonated a suicide car bomb at the entrance the other two managed to enter the campus, he said.
Interior Ministry spokesman Sediq Sediqqi said the attackers were armed with grenades and automatic weapons. The siege of the university lasted almost nine hours, before police killed the two assailants around 3.30 am, he said.
"Most of the dead were killed by gun shots near the windows of their classrooms," Sediqqi said.
More than 150 students who had been trapped in university buildings were rescued by special police units, according to The AP.
State Department Director of Office of Press Relations Elizabeth Trudeau later read a statement saying that they "condemn this attack in the strongest possible terms."
"An attack on a university is an attack on the future of Afghanistan. Our embassy in Kabul, as well as our NATO counterparts of the Resolute Support Mission, are closely monitoring the situation as we are. We understand this situation is ongoing.
"We do understand there are small numbers of Resolute Support advisers who are assisting their Afghan counterparts as Afghan forces are responding as this situation develops. These advisers are not taking a combat role but advising Afghan counterparts," she said.
"We are in the process of accounting for all chief of mission personnel and working to locate and assist any U.S. citizens affected by these attacks. The U.S. embassy in Kabul did issue a security message warning U.S. citizens of the attack and advising them to avoid the area until further notice. Our travel warning for Afghanistan warns U.S. citizens against travel to Afghanistan because of the continued instability and threats by terror attacks against U.S. citizens," she said.
Massoud Hossaini, a photographer for The Associated Press, tweeted that he was trapped inside during the attack.
“Help we are stuck inside AUAF and shooting flollowed [sic] by Explo this maybe my last tweets,” he wrote.
The AP later reported that he was safe and had escaped from the school.
The attackers managed to enter Noor Hospital, adjacent to the school, according to eyewitnesses.
The American University of Afghanistan opened in 2006 and was a pet project of former first lady Laura Bush, who helped launch the institution on a 2005 visit to Kabul, the capital.
Much of its funding has come from the U.S. Agency for International Development, which administers civilian foreign aid, and today the school has more than 1,700 full- and part-time students. It has produced 29 Fulbright scholars and maintains partnerships with many U.S. colleges, such as Stanford, Georgetown and the University of California system.
The school says on its website that it "embraces diversity and community" in Afghanistan.
But it has been no stranger to threats of violence since its creation.
Two professors at the university — one American and one Australian — were abducted at gunpoint outside the campus earlier this month, underscoring the deteriorating security situation in the capital and across the rest of the country.
Also, two people employed by the university were killed in 2014 when a suicide bomber set off an explosion in a Kabul restaurant that was popular with expats.
ABC News' Aleem Agha and Jon Williams contributed to this report. The Associated Press also contributed to this report.