NEW DELHI - Indian Prime Minister Narendra Modi strongly condemned the cowardly attack by Taliban militants Tuesday in Peshawar that killed 141 people - most of them children.

Modi branded the attack in Peshawar "a senseless act of unspeakable brutality" and said India shares rival Pakistan's pain.

"Strongly condemn the cowardly terrorist attack at a school in Peshawar," Modi tweeted.

"It is a senseless act of unspeakable brutality that has claimed lives of the most innocent of human beings - young children in their school."

"My heart goes out to everyone who lost their loved ones today. We share their pain and offer our deepest condolences."

Meanwhile, Indian Home Minister Rajnath Singh earlier said the attack, one of the bloodiest in Pakistan in recent years, exposed the "real face of terrorism".

"I strongly condemn the terrorist attack on a school at Peshawar," he tweeted.

"This dastardly & inhuman attack exposes the real face of terrorism. My heart goes out to the families of those children who got killed by the terrorists in Peshawar."

Witnesses described how gunmen went from classroom to classroom, shooting children, after a huge blast shook the Army Public School.

The Tehreek-e-Taliban Pakistan (TTP) claimed responsibility for the attack as retaliation for a major military offensive in the region, saying militants had been ordered to shoot older students.

Later, Modi spoke to his Pakistan counterpart Nawaz Sharif offering his "deepest condolences" and said India stands firmly with his country in the fight against terrorism. Giving details of his conversation with Sharif in his Twitter account, Modi appealed to all schools across India to observe two-minute silence "as a mark of solidarity."