A spokeswomen for two hospitals in the city said they had received nine bodies and were treating 38 injured people, including several in a critical condition.
At least 13 people were injured during the gun battle between the terrorists and security forces, including eight students, three army soldiers, one policeman and one security guard.
Three burqa-clad gun men have also entered the Directorate as intermittent gunfire, and blast heard from inside the premises.
In a statement, the Inter-Services Public Relations (ISPR) said that all the terrorists have been killed.
A heavy contingent of police rushed to the spot and cordoned off.
The heavily-armed militants, who arrived on an auto rickshaw, attacked the students' hostel of the Directorate of Agriculture Extension on the University Road in the city, the capital of the restive Khyber-Pakhtunkhwa province.
Nigeria Drawn in Group D Alongside Argentina, Iceland and Croatia
But our aim has to be to top the group", he said. " Iceland are very strong physically, have the best fans in Europe. They won a qualifying group that had Croatia , Ukraine and Turkey. "After the draw can always be better or worse.
The area where the incident occurred is a hub for educational institutions including the University of Peshawar. The institute was closed for the Eid-e-Milad holiday, but about 70 students were present in the hostel.
A wounded student, Ahteshan ul-Haq, told Reuters the university hostel usually houses almost 400 students, but most had gone home for a long holiday weekend and only about 120 students remained.
Volunteers carry an injured student after an attack by Taliban gunmen in the city of Peshawar. The forces also rescued the people from the building using armored vehicles amid aerial surveillance of the site.
"We were sleeping when we heard gunshots".
Pakistani security officials inspect the scene of the attack.
Taliban claimed the responsibility, saying in a message from spokesman Mohammad Khorasani that they had targeted a safe house of the military's Inter-Services Intelligence agency. Peshawar, close to the Afghan border, has seen some of the worst violence during the Taliban insurgency in recent years.