At least eight other soldiers wounded in the attack near the country’s border with Mali, government says.
Gunmen have killed at least 19 gendarmes and a civilian in northern Burkina Faso, in the tri-border region where the country has for years been battling armed groups.
Security Minister Maxime Kone told state media on Sunday the toll from the attack on a military police outpost near a gold mine in Inata was provisional.
“This morning a detachment of the gendarmerie suffered a cowardly and barbaric attack. They held their position,” Kone said, adding that 22 survivors had been found.
There were fears the death toll could rise.
There was no immediate claim of responsibility for the attack, one of the deadliest against defence and security forces since Burkina Faso was gripped by conflict in 2015.
It came two days after another assault in which seven police officers were killed in the area near Niger and Mali.
Attacks by armed groups linked to al-Qaeda and ISIL (ISIS) have continued to intensify in the tri-border area despite the presence of thousands of United Nations, regional and Western troops and efforts by some governments to negotiate with the fighters.