A further 22 people were wounded by the attackers.
No group immediately took responsibility for the ongoing attack though the Taliban issued a statement saying they were not involved.
Pakistan on Monday strongly condemned the "mindless attack at Kabul University", that has resulted in the loss of 19 people and injuries to many more.
At least 19 people were killed Monday when militants stormed one of Afghanistan's main universities in a brutal, hours-long assault that saw students left in pools of blood in their classrooms.
The Islamic State group said it targeted newly graduated "judges and investigators belonging to the apostate Afghan government" gathered at the campus, according to the SITE Intelligence Group, which monitors terror online messaging.
The Taliban said their fighters were not involved in the assault.
Iranian diplomats have been targeted previously by attacks in the country and almost sparked a war between the two countries. The group also claimed responsibility for a 2018 attack in front of Kabul University in which dozens were killed.
Study finds over 80 percent of COVID-19 patients vitamin D deficient
The symptom normally develops within a week to four weeks of getting the disease and normally goes away within a fortnight. One of the scientists warned that some were still suffering due to "COVID toes" 150 days later.
Students of the Kabul University escaped the compound with many climbing the boundary walls after the three assailants stormed the varsity, Tolo News said, citing sources.
Kabul police spokesman Ferdaws Faramerz told AFP most of those killed were students.
We were very scared and we thought it could be the last day of our lives. boys and girls were shouting, praying and crying for help. It comes as the insurgents continue peace talks with representatives of Kabul's Washington-backed government, with the aim to help the USA finally withdraw from Afghanistan. He added that security forces have arrived at the scene.
Violence has plagued Afghanistan while government and Taliban negotiators have been meeting in Qatar to try to broker a peace deal and as the United States brings home its troops.
Interior Ministry confirms gunfight near Kabul University and says police have been sent to the area.
As the attack unfolded, students and teachers were seen fleeing the part of the campus where law and journalism schools are located, while hand grenades exploded and automatic rifle fire could be heard.
Several education centers have been attacked over the years by extremist groups such as Islamic State (IS). "Afghan children & youth need to feel safe going to school", NATO Senior Civilian Representative to Afghanistan Stefano Pontecorvo said in a statement.
That, and the stalled peace talks, have left many wondering: how and when will it ever end?