Pakistani Taliban militants have attacked the campus of an agriculture university in the northwestern city of Peshawar, killing at least 13 people.

The gunmen, disguised as women, arrived at the Agriculture Institute of Peshawar on Friday. They shot and wounded a guard before entering the campus, said police chief Tahir Khan.

Police and armyinfo-icon commandos arrived and cordoned off the campus, Khan said, who added that a blast was also heard from the campus.At least 35 others were also wounded in the attack.

Police and army troops killed all of the gunmen -- who were reportedly three -- about two hours into the attack, the military said.

He said that the university hostel usually houses nearly 400 students, but most had gone home for a long holiday weekend and only about 120 students were there at the time of the attack.Peshawar, which is close to the Afghan border, has been the scene of violence by Pakistani Taliban in recent years.

Tehreek-e-Taliban Pakistaninfo-icon, the Pakistani Taliban, has claimed responsibility for the attack.Mohammad Khorasani, a spokesman for the militant organisation, said they had targeted a safe house of the military's Inter-Services Intelligence agency.

The attackers arrived at the Agricultural Training Institute on Friday morning, before shooting and wounding a guard and entering the campus, Peshawar police chief Tahir Khan said.

A wounded student, Ahteshan ul-Haq, told Reuters the university hostel usually houses nearly 400 students, but most had gone home for a long holiday weekend and only about 120 students remained.

"We were sleeping when we heard gunshots. I got up and within seconds everybody was running and shouting 'the Taliban have attacked'," he said.Shehzad Akbar, medical director of Hayatabad Medical Complex, said six people died of their wounds and 18 were being treated. Another three people died at Khyber Teaching Hospital and 17 wounded were there, director Nekdad Afridi said.

In December 2014, Pakistani Taliban gunmen killed 134 children at Peshawar's Army Public School, one of the single deadliest attacks in the country's historyinfo-icon