All seven attackers also died, although it was not clear whether they blew themselves up or were killed, Bajwa told The Associated Press.
"Their sole purpose, it seems, was to kill those innocent kids. That's what they did," Bajwa said.
As evening arrived, Pakistani officials declared a military operation to clear the school of attackers to be over.
Throughout the day, terrified parents visited area hospitals, frantically searching for their children.
"My son was in uniform in the morning. He is in a casket now," parent Tahir Ali wailed as he came to a hospital to collect the body of his 14-year-old son Abdullah, according to The Associated Press. "My son was my dream. My dream has been killed."
Students in green uniforms could be seen on Pakistani television fleeing the school.
More than 1,000 students in grades 1 to 10 attend classes at the school, including many children of military families.
Besides those killed in the attack, numerous people were injured, Chief Minister Pervez Khattak of the Khyber Pakhtunkhwa province said earlier. Ambulances were seen transporting the injured after the attack started in the early morning.
Among the injured were 121 students, three staff members and nine Pakistani military commandos, a military official said.
The attack drew widespread condemnation, even from the Taliban in neighboring Afghanistan.
"Killing innocent children is against the principals of Afghan Taliban and we condemned," Afghan Taliban spokesman Zabiullah Mujahid said in a statement to the media. "Our thoughts are with the families of those who lost their love[d] ones."
Pakistan's neighbors, India and Afghanistan, and the United States also were among those who sent condolences.
"By targeting students and teachers in this heinous attack, terrorists have once again shown their depravity," President Obama said in a statement. "We stand with the people of Pakistan, and reiterate the commitment of the United States to support the government of Pakistan in its efforts to combat terrorism and extremism and to promote peace and stability in the region."
Malala Yousafzai, the Pakistan native who survived a 2012 shooting and won the Nobel Peace prize for her efforts to promote education, denounced the attack in a Facebook post on her Malala Fund nonprofit page.
"I am heartbroken by this senseless and cold blooded act of terror in Peshawar that is unfolding before us," she wrote in the statement. "Innocent children in their school have no place in horror such as this."