The government in Togo says eight soldiers have been killed and 13 wounded in what it called a terrorist attack at Kpinkankandi in the northern Savanes region of the country near the border with Burkina Faso.
Togolese troops are deployed in the north to try to contain a jihadist threat pushing south from Mali, Niger and Burkina Faso, where militants linked to al-Qaeda and the Islamic State group operate.
A senior security source in Togo told the AFP news agency that the soldiers were attacked by a group of 60 gunmen on motorbikes.
This is thought to be the first deadly attack by Islamist militants in Togo.
Officials said troops had foiled an attempted raid in November.