Some 480 Nigerian soldiers have fled into Cameroon following fierce fighting with Boko Haram militants, Cameroon’s army has said.
Army spokesman Lt Col Didier Badjek said the soldiers had been disarmed and were now being accommodated in schools.
Clashes are said to be continuing in the border town of Gamboru Ngala.
Boko Haram on Sunday released a video in which it said it had established an Islamic state in the towns and villages it controls in north-eastern Nigeria.
The group’s five-year insurgency has intensified in recent months despite the deployment of thousands of extra troops to the worst-affected areas.
Last week, a group of soldiers refused to follow orders to go and fight Boko Haram, saying the militants were better equipped.
Insurgents also seized one of Nigeria’s two main police training academies, which is near the town of Gwoza, captured earlier this month.
The Nigerian soldiers are currently in the Cameroonian town of Maroua, about 80km (50 miles) from the Nigerian border, Lt Col Badjek told the BBC.
Thousands of civilians are also said to have fled across the border.
Cameroon has officially closed its 1,600-km border with Nigeria to help contain the spread of the deadly Ebola virus but correspondents say this is impossible to enforce in the remote areas near the fighting.
Boko Haram launched an attack on the police station and a military base in Gamboru Ngala at 05:30 local time (04:30 GMT), the AFP news agency reports.
In May, some 300 people were killed in an attack which left much of the town in ruins.
It is near Gwoza, the largest town under control of Boko Haram. In the most recent census, in 2006, it had a population of more than 265,000 people.
In the 52-minute video released on Sunday, Boko Haram leader Abubakar Shekau said Gwoza was now “part of the Islamic state”.
He did not specify whether his group now had any links to the Islamic State (IS) group, which has seized much of northern Iraq in recent months, prompting the US to respond with air strikes.
There is no evidence for such links but in July, Mr Shekau congratulated IS on its territorial gains.
Who are Boko Haram?
- Founded in 2002
- Initially focused on opposing Western education – Boko Haram means “Western education is forbidden” in the Hausa language
- Launched military operations in 2009 to create an Islamic state
- Thousands killed, mostly in north-eastern Nigeria – but also attacks on police and UN headquarters in capital, Abuja
- Some three million people affected
- Declared terrorist group by US in 2013
Boko Haram controls several areas, mostly in Borno state where the group was launched, but also in neighbouring Yobe state.
Nigeria’s military spokesman Chris Olukolade responded with a statement dismissing the declaration of an Islamic state as “empty”.
The video also shows about 20 men in civilian clothes apparently being shot dead.
The BBC’s Nathalie Wakam in Cameroon says the situation is worrying for the country’s officials, who have called on the international community to help them tackle the threat from Boko Haram.
China, France, the US and UK all sent some military assistance – advisors and help with intelligence – to Nigeria after some 200 schoolgirls were seized from Chibok, near Gwoza, in April.