An attack on the American University of Afghanistan has ended, a senior police officer said Thursday, after at least seven people were killed and more than 30 were wounded.

Kabul police Chief Abdul Rahman Rahimi said the dead included one guard, and that about 700 students had been rescued.

Rahami said one foreign teacher had been wounded.

There were no immediate claims of responsibility for the attack on the university on the edge of Kabul. It was established in 2006 to offer liberal arts courses modeled on the U.S. system, and has more than 1,000 students currently enrolled.

Police spokesman Sediq Sediqqi earlier said was still not clear if there were one or two attackers.

Hedayatullah Stanikzai, an official with the Ministry of Public Health, said a guard employed by the university had been killed and that the wounded included a foreign teacher. University authorities could not immediately be reached for comment.

Dejan Panic, the program director at Kabul's Emergency Hospital, said 18 people wounded in the attack, including five women, had been admitted. He said three were "seriously" wounded, probably from automatic gunfire.

AP photographer Massoud Hossaini was in a classroom with 15 students when he heard an explosion on the southern flank of the campus.

"I went to the window to see what was going on, and I saw a person in normal clothes outside. He shot at me and shattered the glass," Hossaini said, adding that he fell on the glass and cut his hands.

The students then barricaded themselves inside the classroom, pushing chairs and desks against the door, and staying on the floor. Hossaini said at least two grenades were thrown into the classroom, wounding several of his classmates.

Hossaini and about nine students later managed to escape from the campus through an emergency gate.

"As we were running I saw someone lying on the ground face down, they looked like they had been shot in the back," he said.

Hossaini and the other students took refuge in a residential house near the campus, and were later safely evacuated by Afghan security forces.

The Pentagon said U.S. military advisers were on the ground with Afghan security forces at the university. Spokesman Adam Stump said the forces had been embedded with the Afghan units.

The attack on AUAF comes two weeks after two university staff, an American and an Australian, were kidnapped from their car by unknown gunmen. Their whereabouts are still unknown.

The U.S. State Department condemned what it called "an attack on the future of Afghanistan."

The Taliban have been fighting to overthrow the Kabul government for 15 years, and regard foreign civilians as legitimate targets.