BAUCHI, Nigeria -- Nigeria's military Saturday repelled an attack on a northeastern town by Boko Haram Islamic extremists who, as they retreated, warned residents not to participate in the country's elections in March.

Two air force jets joined soldiers in attacking the rebels after they assaulted Gombe in the morning.

The Boko Haram fighters left in a convoy of vehicles carrying dozens of corpses, according to residents.

"They were heard telling our people in the villages leading to Gombe that they have not come to harm civilians but the security agents. They were also dropping copies of papers with messages written in Hausa warning people not to participate in the coming elections, lest they risk being killed," said resident Malam Hassan.

The Associated Press obtained a copy of the message in which Boko Haram warned that its fighters will attack all polling stations in the March 28 elections. The Boko Haram paper also said residents should not assist the army and pledged not to attack those who stayed out of its fight against the government.

"We are calling on you all to come and join us in the Jihad and embrace Islamic Sharia jurisprudence," said the papers dropped by Boko Haram.

The fiercest fighting was about three kilometres outside the town, resident Jummai Aliyu said.

Gombe has previously been attacked multiple times, including by a car bomb in December that killed at least 20 people.

Boko Haram's Islamic extremist insurgency killed 10,000 people last year compared to 2,000 in the four previous years, according to the U.S. Council on Foreign Relations. Fighting has forced some 157,000 people to seek refuge in Niger, while 40,000 others have gone to Cameroon and 17,000 are in Chad, according to the United Nations.

On Friday, the group staged its first attack on Chadian territory, bringing to three the number of neighbouring countries roped into what had previously been an internal Nigerian conflict. The targeted village, Ngouboua, was already home to nearly 3,300 refugees who had fled Boko Haram-related violence in Nigeria, according to the UN.

Cameroon and Niger have also been attacked. Along with Benin, all three have vowed to contribute to a regional force against Boko Haram that is expected to be launched in the coming weeks, though funding questions remain unsettled.

Boko Haram's media division on Saturday claimed on Twitter that "more than 48" soldiers had been killed in fighting in Diffa, Niger, and that "more than 24" Chadian soldiers were killed in recent fighting in Gamburu, Nigeria, according to the SITE Intelligence Group, which monitors militant forums. The numbers could not be verified. They were higher than casualty figures provided earlier by officials in Niger and Chad.

Nigeria announced Feb. 7 that it was pushing back planned presidential and legislative elections by six weeks, to March 28, because of insecurity.

The United Nations special representative for West Africa said Friday that Nigeria's military needs to show "greater resolve" in the widening fight against Boko Haram.