Nigerian militant Islamist group Boko Haram has seized control of two towns in the country's east after Nigerian soldiers stationed there allegedly fled across the border to Cameroon, Al Jazeera reported Tuesday, citing police sources.

Three people were reportedly killed by Boko Haram militants in the border towns of Ashigashya and Kerawa, as almost 500 Nigerian soldiers fled into Cameroonian territory.

Nigeria’s military, however, dismissed the allegations and said that its troops were charging through the border in a “tactical maneuver” when they accidentally crossed into Cameroon. The soldiers “followed protocol by handing over their weapons in order to assure the friendly country that they were not on a hostile mission,” an unnamed Nigerian military source told Al Jazeera, adding that the soldiers were now on their way back to Nigeria. 

A Nigerian police officer told Al Jazeera that the security situation in the country is “deteriorating day by day in the border towns” and that Boko Haram is now attempting to capture Cameroonian territory across the border.

Cameroon, meanwhile, is doubling its efforts to tackle Boko Haram militants infiltrating its territory, according to a Voice of America report.

“Cameroon soldiers have instructions to defend our borders. So they will fight for as long as they are assaulted by Boko Haram to protect our borders,” Cameroonian information minister Issa Tchiroma told Voice of America.

On Sunday, Boko Haram had claimed that it has established a caliphate in the northeastern regions of Nigeria. However, the Nigerian military refuted its claims and said that the “sovereignty and territorial integrity” of the country was still intact.

Boko Haram, which seeks to govern the captured territories in accordance with a fundamentalist interpretation of Sharia law, has killed more than 5,000 civilians between July 2009 and June 2014, including at least 2,000 people this year alone, according to a Guardian report. Nearly half a million people have been forced to flee across the border into the neighboring countries of Niger, Cameroon and Chad.