Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

DAMATURU, Nigeria - Gunmen from Islamist group Boko Haram stormed a boarding school in Nigeria overnight and killed 29 pupils, police and the military said on Tuesday.

Many of the victims died as the school was burned to the ground.

"Some of the students' bodies were burned to ashes," Police Commissioner Sanusi Rufai said of the attack on the Federal Government college of Buni Yadi, a secondary school in Yobe state in the country's northeast.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

All those killed were boys. No girls were touched, Rufai said.

Boko Haram, whose struggle for an Islamic state in northern Nigeria has killed thousands, are increasingly preying on the civilian population.

Boko Haram leader Abubakar Shekau, center, sitting flanked by militants in a still from video released on YouTube on April 12, 2012. AFP - Getty Images, file

The militant group, whose name means "Western education is sinful" in the northern Hausa language, have frequently attacked schools in the past. A similar attack in June in the village of Mamudo left 22 students dead.

More than 200 people were killed in two attacks last week, including one in which militants razed an entire village and shot panicked residents as they tried to flee.

The failure of the military to protect civilians is fuelling anger in the northeast, the region worst affected by the four- and-a-half-year-old insurgency. An offensive ordered by President Goodluck Jonathan in May has failed to crush the rebels and triggered reprisals against civilians.

Boko Haram have also started abducting scores of girls, a new tactic reminiscent of Uganda's cult-like Lord's Resistance Army in decades past.

-- Reuters