Al-Qaeda's regional branch on Sunday said its hearts were "bursting with pain" over the Taliban's massacre at a Pakistan school and urged the militants to target only security forces.

The attack on Tuesday killed 149 people -- mostly children -- in the northwestern Pakistani city of Peshawar.

"Our hearts are bursting with pain and grief over this incident," Osama Mehmood, spokesman for Al-Qaeda South Asia chapter said in a four-page emailed statement.

"There is no doubt that the list of crimes and atrocities of the Pakistani army has crossed the limit and it is true that this army is ahead of everyone in America's slavery and genocide of Muslims... but it does not mean that we should seek revenge from oppressed Muslims," Mehmood said.

"The guns that we have taken up against Allah's enemy America and its pet rulers and slave army should not be aimed towards children, women and our Muslim people," he added.

Al-Qaeda chief Ayman al-Zawahiri announced the creation of the new South Asia branch in September to "wage jihad" in Myanmar, Bangladesh and India.

The Afghan Taliban, who are loosely affiliated with Tehreek-e-Taliban Pakistan (TTP), have also condemned the attack, saying killing innocent children was against Islam.

Pakistan described the bloody rampage as its own "mini 9/11", saying it was a game changer in its fight against terror.

The army has been waging a major offensive against longstanding Taliban and other militant strongholds in the restive tribal areas on the Afghan border for the last six months.