Sharif reiterated that military operation 'Zarb-e-azab' to flush out terrorists from the country's tribal belt will continue.
"It's a sheer act of cowardice...the country should unite to combat terrorism," he added.
Army Chief General Raheel Sharif also reached Peshawar to monitor the situation.
In one of the most gruesome attacks in recent years against children anywhere in the world, the militants went from classroom-to-classroom shooting indiscriminately at the shocked students, eyewitnesses told local media.
One rescued student told reporters that the attackers had long beards and they were wearing 'shalwar kamiz'.
He said they were speaking Arabic and looked like foreigners.