peshawar school aftermath
A soldier inspects the Army Public School the day after it was attacked by Taliban gunmen. Zohra Bensemra/Reuters

Pakistani authorities have hanged two convicted terrorists with links to the Taliban following the group's massacre at a school in Peshawar city.

The militants were hanged in the city of Faisalabad, according to accounts from two separate officials as well as Pakistani state television.

"Two militants, Aqeel - alias Doctor Usman - and Arshad Mehmood have been hanged in Faisalabad jail," Shuja Khanzada, Home Minister of central Punjab province, told AFP news agency.

Pakistani Prime Minister Nawaz Sharif lifted a moratorium on capital punishment in cases related to terror following the school attack which left at least 141 people dead.

The United Nations had earlier urged that Pakistan not carry out executions in response to the attack.

"To its great credit, Pakistan has maintained a de facto moratorium on the death penalty since 2008," said UN human rights spokesman Rupert Colville.

"We urge the government not to succumb to widespread calls for revenge, not least because those at most risk of execution in the coming days are people convicted of different crimes."

The siege on the school ended when Pakistani authorities killed all of the attackers who participated in the assault which has been confirmed as the deadliest ever by the terror group in Pakistan.

Pakistani Prime Minister Nawaz Sharif said that the attack was a "national tragedy" while Pakistani opposition leader and former cricket captain Imran Khan said it was "utter barbarism".