Militants from extremist group Boko Haram attacked several Nigerian towns, torching houses and fatally shooting those who fled before reportedly beheading some of the bodies with chainsaws. The string of terror attacks comes amid the presidential vote.

At least 25 people were killed and more than 30 injured in the village of Buratai in Borno state, local officials confirmed.



Surviving witnesses described gruesome scenes of murder, saying that not only did the extremists set homes on fire and shoot those trying to escape, but also decapitated the bodies.



Local politician Ibrahim Adamu, who fled the scene, told CNN that Boko Haram “slaughtered their victims like rams and decapitated them,” adding that “they burned a large part of the village and we are afraid some residents were burnt in the homes because most people had gone to bed when the gunmen struck.”



Meanwhile, at least 14 people were killed in separate attacks by the radical Islamist group in the towns of Biri and Dukku, located in Gombe state. The victims included a legislator, AP reported.

READ MORE: Boko Haram kills 50 women & children in Nigerian town, captures up to 500 – report

The attacks came after the Nigerian military announced Friday that it had cleared all major centers in the northeast from militants. They also coincide with the country's presidential election, which Boko Haram had vowed to derail.



Tens of millions took to polling stations on Saturday in Africa’s most populous nation to vote in a closely contested election, with two of the 14 candidates – President Goodluck Jonathan and former military dictator Muhammadu Buhari – being the frontrunners.



Legislators for the 360-seat lower house of the Nigerian parliament are also being elected.



There were reports of attempted bombings attributed to Boko Haram at several polling stations, but those failed to disrupt the voting process and no one was injured.



The elections had been delayed due to a sharp increase in violence in the country, where 20 regions were controlled by Boko Haram extremists at the beginning of the year. On March 17, Nigeria’s army managed to regain control over large swathes of the country's northeast, making further progress in recent days. Niger-Chad forces assisted in freeing parts of Nigeria's border areas.

READ MORE: New Boko Haram victims: Mass grave of almost 100 bodies found in Nigeria

That, however, did not stop the attacks, as the extremists captured more than 500 women and children from the Nigerian town of Damasak, killing at least 50 straight away, according to Tuesday reports.



Last April, nearly 300 schoolgirls were abducted by Boko Haram in the town of Chibok, which caused international outrage and attracted global attention to the group's six-year insurgency.



Boko Haram recently pledged allegiance to the Islamic State (IS, formerly ISIS/ISIL) militant group.

READ MORE: Partners in jihad: ISIS welcomes Boko Haram’s allegiance