NEW DELHI: Pakistan has announced three days of mourning as the deadly siege of an army school in Peshawar came to a close, with 141 people -- of which 132 were children -- were killed.

The attack, carried out by the Tehreek-i-Taliban Pakistan (TTP), is over, with all seven militants killed. The TTP claimed responsibility for the attack, and said, “It's a revenge attack for the army offensive in North Waziristan." TTP spokesperson Muhammad Khorasani said, “We selected the army's school for the attack because the government is targeting our families and females… We want them to feel the pain."

About 1100 students were believed to be inside when the attack occurred. In addition to the 141 people killed, 121 students, three staff members, and seven commandos were wounded.

Pakistani Prime Minister Nawaz Sharif, whose government cleared the military offensive after repeated failed attempts at dialogue with the TTP, issued a strong condemnation. “The perpetrators behind this terrorist attack must not be spared but first priority is the safe rescue of kids and innocent people from the school," a statement by the Prime Minister said.

(The lifeless body of a Pakistani student, a victim of a Taliban attack on a military school, at a hospital in Peshawar, Pakistan, Dec. 16, 2014. Mohammad Sajjad / AP. Image from Al Jazeera)

(A family mourns their son Mohammed Ali Khan, 15, a student who was killed during the attack. Zohra Bensemra / Reuters. Image from Al Jazeera).

(Relatives mourn a student killed in the attack. Image from Al Jazeera).

(Coffins were stacked at this hospital in Peshawar in readiness. Image via Reuters/BBC).

The Pakistan military began Operation Zarb-e-Azb in North Waziristan in June, thus far killing more than 1270 militants and security over 90 percent of the area. It is also undertaking a military operation in Khyber Agency, which borders Peshawar known as Khyber 1, which has killed at least 179 fighters.

The two operations themselves were in response to increased TTP attacks, with the final blow being an attack on the Karachi airport that killed 39 people and was claimed by the TTP, which the latter linked directly to peace talks with the government. TTP spokesperson Shahidullah Shahid referred to the talks as a “tool of war” and confirmed that the attack on the Karachi airport was planned much earlier but had been delayed owing to the ceasefire announced in connection with the peace talks.

Shahid added that the attack was additionally linked to avenging the death of TTP commander Hakimullah Mehsud in a United States drone strike. “We carried out this attack on the Karachi airport and it is a message to the Pakistani government that we are still alive to react over the killings of innocent people in bomb attacks on their villages,” Shahid said.

The TTP spokesperson further referred to the military airstrikes in North Waziristan as a motive behind the attack. These previous airstrikes were perhaps also linked to attacks that targeted the Pakistani army. The Taliban talks have been characterised by a cycle of dialogue that seems to make no progress, militant attacks, and a military response, which brings the Taliban back on the table.

Most recently, in early May, reports that the talks were back on track seemed to be short-lived a day later as the government - responding to militant attacks in in the northwestern town of Charsadda, Badbher, Chaman and on a fruit and vegetable market in Islamabad - carried out airstrikes in the northwestern tribal belt killing at least 24 militants.

Previously, the talks were called off in February following the killing of 23 paramilitary soldiers by a faction of the Taliban in February. The government had responded with airstrikes in North Waziristan, with the possibility of a full scale military offensive being reported, prompting the Taliban to declare a ceasefire and reiterate its commitments to the dialogue process.

As the talks resumed, the Taliban demanded the release of prisoners and the creation of a demilitarised peace zone in mountainous Shaktoi, South Waziristan as a preconditioning for extending the month-long ceasefire. The government released 19 prisoners with the promise of releasing more, whilst the Taliban announced a ceasefire extension. The release of prisoners was a contentious issue, leading the government to clarify that it was done with the support of the army.

The trend is reflective of the fact that the peace talks were set to fail from the start, with the militants declaring a ceasefire when directly attacked, but failing to enforce it and readily willing to abandon it. During the month long ceasefire, that was called in response to the government launching strikes in North Waziristan after 23 paramilitary soldiers were executed, attacks continued despite the fact that negotiations were in full swing. The most violent of these attacks was the bomb attack on the district courts complex in Islamabad, which was claimed by the previously unknown Ahrarul Hind group.

After the group declared the ceasefire, attacks still continued, with 19 people killed in a powerful bomb attack in Islamabad and 17 people dying in a bomb explosion inside a carriage of a Rawalpindi bound train at Sibi station within a span of a day. Although the Taliban denounced both attacks Intelligence reports alerted police and government officials to attacks in Islamabad, Peshawar and Quetta, stating that these were being planned by factions within the TTP that were opposed to the dialogue process. Pakistani media had in fact carried stories quoting sources that claimed a new group, Ansarul Hind, would carry out attacks with the TTP’s backing.

“TTP will choose the targets and the informal groups under its umbrella will provide support to the Ansarul Hind activists with weapons and other materials,” an anonymous official was quoted in a leading Pakistani paper.

The recent split in the Taliban has complicated the process further, as an already heterogenous militant body that had difficulty imposing decisions taken by the central leadership has fragmented even further.

The government had thus far, always gone back to the negotiating table causing a reported rift in civilian-military relations. With the ongoing operation, the peace dialogue has faced its final blow, and the army has reasserted its primary position in Pakistan’s national security policy. This attack on the Peshawar school will reinstate this position further.