Chad's army says it has killed more than 200 militant Islamists and lost nine men during a battle to recapture a key town in north-eastern Nigeria.
Boko Haram militants killed about 30 people after fleeing from the battle to Cameroon, a resident said.
It was the most intense battle known to involve Chadian troops since they entered the conflict in Nigeria.
Chad and Nigeria are also bombing the vast Sambisa forest, where the militants have bases.
Boko Haram fighters were suspected to have taken to the forest more than 200 schoolgirls it abducted in April from the north-eastern Nigerian town of Chibok.
It is not clear whether any of the girls are still there. Boko Haram leader Abubakar Shekau has since said that the girls have been married off.
Chad sent troops to Cameroon last month to join the offensive against Boko Haram, following widespread criticism of the Nigerian army's failure to curb the insurgency.
About 2,000 Chadian troops backed by armoured vehicles crossed into Nigeria on Tuesday to battle Boko Haram for control of Gamboru, a small town on the border with Cameroon.
Chad's army said it had recaptured the town, although the sound of automatic gunfire was still heard on Wednesday in Gamboru, AFP news agency reports.
Retreating Boko Haram fighters have raided Fotokol, a town on the Cameroonian side of the border, a resident said.
She told the BBC Hausa service that she had seen about 30 bodies, all with gunshot wounds, in a mosque in the town.
The six-year insurgency has claimed thousands of lives and displaced some 1.5 million people.
Nigeria's military is under increasing pressure to regain territory ahead of the 14 February presidential election, amid concerns that the insurgency will prevent many people in the north-east from voting.
Boko Haram at a glance
- Founded in 2002, initially focused on opposing Western-style education - Boko Haram means "Western education is forbidden" in the Hausa language
- Launched military operations in 2009 to create Islamic state
- Thousands killed, mostly in north-eastern Nigeria - has also attacked police and UN headquarters in capital, Abuja
- Has abducted hundreds, including at least 200 schoolgirls
- Controls several north-eastern towns
- Has launched attacks on Cameroon