Local media reported that police and the army reached the site shortly afterwards and exchanged fire with the attackers.
The Dawn quoted police officials, as saying that the terrorists aimed to attack the university hostel.
The area where the attack took place is a hub for educational institutions in the city, including the University of Peshawar. An eyewitness said he and his colleagues were sleeping when the firing started Geo News reported.
The attack in Peshawar occurred on a holiday celebrating the birth of the Prophet Muhammad. NBC News Google Maps
A senior police official said all the terrorists were killed by security forces.
Ordinarily, there are around 400 students at the hostel but there were only some 150 on Friday on account of Eid Milad-un-Nabi, the birthday of Prophet Mohammad, said a student who witnessed the attack. The university hostel usually houses almost 400 students, but most had gone home for a long holiday weekend and only about 120 students remained.
The Pakistani Taliban later released a video showing the attack, recorded with what appeared to be a body-mounted camera.
Redmi 5A first impressions: Xiaomi's next shot
To avail this additional cashback, Redmi 5A users will have to recharge their accounts with the Rs. 199 Jio pack for 12 months. Xiaomi Redmi 5's official image was also leaked a few days ago which shows off the actual design of the phone.
"This attack is a reaction to the continued brutalities by the intelligence agencies of Pakistan on Tehreek-e-Taliban Pakistan and innocent people especially prisoners and clerics", the group said. After shooting the guard present at the gate, the terrorists went on to the hostel of the building and began firing.
Shehzad Akbar, medical director of Hayatabad Medical Complex, said six people died of their wounds and 18 were being treated.
At least 12 people were killed and 38 including two policemen and one journalist sustained injuries who were then shifted to Khyber Teaching Hospital.
Trump Responds To CNN Boycott Of Christmas Party
Many readers applauded the Trump family for paying tribute to Gold Star and military families in their Christmas decorations . And that wish for a Merry Christmas, was proclaimed loud and proud, all the way down to this year's official Christmas cards.
In December 2014, a Taliban attack on the army-run school in Peshawar killed 151 people, mostly schoolchildren.
The Taliban are fighting to topple the government and install a strict interpretation of Islamic law. They are loosely allied with the Afghan Taliban insurgents.
City tops in crimes against sr citizens, 2nd against women
Mumbai also ranked second in cases of kidnapping and abduction of children, with 5,457 cases in Delhi and 1,864 cases in Mumbai . Uttar Pradesh missed the dubious distinction of recording most rape cases in the country by a whisker.