PESHAWAR, PAKISTAN — Taliban gunmen stormed a military-run school in the northwestern Pakistani city of Peshawar on Tuesday, killing at least 141 people, mostly children, before Pakistani officials declared a military operation to clear the school over.

The overwhelming majority of the victims were students at the school, which instructs grades 1-10. Pakistani Prime Minister Nawaz Sharif condemned the assault and rushed to Peshawar to show his support for the victims.

How the attack unfolded.

As darkness fell on the area, officials said they had cleared the school of militants.

A Pakistani military spokesman, Asim Bajwa, said 141 people died in the attack — 132 children and nine staff members. He declared the operation over and said the area had been cleared. An additional 121 students and three staff members were wounded.

He said seven attackers, all wearing explosives vests, all died in the assault. It was not immediately clear if the militants were all killed by the soldiers or whether they blew themselves up, he said. Bajwa described an assault that seemed designed purely to terrorize the children rather than take anyone hostage to further the militant group's aims.

“Their sole purpose, it seems, was to kill those innocent kids. That's what they did,” he said.

The horrific attack, claimed by the Tehreek-e-Taliban, a Pakistani militant group trying to overthrow the government, sent dozens of wounded flooding into local hospitals as terrified parents searched for their children.

“My son was in uniform in the morning. He is in a casket now,” wailed one parent, Tahir Ali, as he came to the hospital to collect the body of his 14-year-old son Abdullah. “My son was my dream. My dream has been killed.”

The attack began in the morning when the gunmen entered the school and started shooting at random. Army commandos quickly arrived at the scene and started exchanging fire with the gunmen. Students wearing green school uniforms could be seen fleeing the area on Pakistani television.

Map of Peshawar

Outside the school, two loud booms of unknown origin were heard coming from the scene in the early afternoon, as Pakistani troops battled with the attackers. Armoured personnel carriers were deployed around the school grounds, and a Pakistani military helicopter circled overhead.

Pakistani television showed soldiers surrounding the area and pushing people back. Ambulances streamed from the area to local hospitals.

The prime minister vowed that the country would not be cowed by the violence and that the military would continue with an aggressive operation launched in June to rout militants from the North Waziristan tribal area.

“The fight will continue. No one should have any doubt about it,” Sharif said.

Bajwa said that 1,099 students and staff were registered at the school.

Loading... Loading... Loading... Loading... Loading... Loading...

It is part of a network of schools run by the Pakistani military around the country. The student body is made up of both children of military personnel as well as civilians. A government official, Javed Khan, said most of the students appeared to be civilians rather than children of army staff. But analysts said the militants likely targeted the school because of its military connections.

“It's a kind of a message that we can also kill your children,” said Pakistani analyst Zahid Hussain.

One of the wounded students, Abdullah Jamal, said that he was with a group of 8th, 9th and 10th graders who were getting first-aid instructions and training with a team of Pakistani army medics when the violence began for real.

When the shooting started, Jamal, who was shot in the leg, said nobody knew what was going on in the first few seconds.

“Then I saw children falling down who were crying and screaming. I also fell down. I learned later that I have got a bullet,” he said, speaking from his hospital bed.

Another student, Amir Mateen, said they locked the door from the inside when they heard the shooting but gunmen blasted through the door anyway and opened fire.

In a phone call to reporters, Taliban spokesman Mohammed Khurasani claimed responsibility for the attack, saying the suicide bombers carried it out to avenge the killings of Taliban members at the hands of Pakistani authorities.

Peshawar has been the target of frequent militant attacks in the past but has seen a relative lull recently.

The Pakistani military launched the military operation in the nearby North Waziristan tribal area in June, vowing that it would go after all militant groups that had been operating in the region. With the launch of the operation, security officials and civilians feared retribution by militants but until Tuesday, a widespread backlash had failed to materialize.

Tuesday's attack calls into question whether the militants have been crippled by the military or will be able to regroup. This appeared to be the worst attack in Pakistan since a 2007 suicide bombing in the port city of Karachi killed 150 people.

The violence also underscored the vulnerability of Pakistani schools, which was dramatically exposed in the attack two years ago on Malala Yousafzai, a Pakistani girl shot in the head by a Taliban gunman outside her school in the Swat Valley for daring to speak up about girls' rights. She survived, becoming a Nobel Prize laureate and global advocate for girls' education but out of security concerns has never returned to Pakistan.

Militants have also blown up schools in the northwest.

“I am heartbroken by this senseless and cold blooded act of terror in Peshawar that is unfolding before us,” said Malala in a statement.