Pakistani Prime Minister Nawaz Sharif has brought back the death penalty in cases of terrorism, following the Taliban attack on an army school in Peshawar which killed 141 people.

Government spokesman Mohiuddin Wani confirmed that Sharif had approved a ministerial decision to lift Pakistan's moratorium on hanging, but only for terror cases.

"It was decided that this moratorium should be lifted. The Prime Minister approved," he said.

Authorities said on the Taliban militants who stormed the school did not intend to take anyone hostage, and sprayed bullets at people indiscriminately, most of them children.

The singular aim of the attackers was to kill as many as possible. The attack claimed the lives of at least 132 children and nine school staff members, according to military spokesperson Asim Bajwa.

A total of 125 people were wounded, according to the army, before all seven attackers were killed.

Peshawar residents have begun to bury the dead. Sharif has declared three days of mourning in the country while tributes have been pouring in from across the world.

The Pakistan military has pledged the continuation of anti-terror operations until the last militant faces justice.

Sharif is set to host a meeting which will be attended by all parliamentary parties to show solidarity against terrorists.

"These were my children. This is my loss. This is the nation's loss," said Sharif.