Mali's president said on Sunday he could let Burkina Faso forces pursue jihadist fighters when they flee across the border into his country, days after militants massacred 12 Burkinabe soldiers.
Around 40 fighters attacked a base some 30 kilometres from the Burkina-Mali border on Friday in what local authorities called the biggest ever jihadist attack on the army.
It was the second direct strike against the Burkina army since jihadist militants surfaced in the country in early 2015, mostly staging attacks in the north near the borders of Mali and Niger.
Malian President Ibrahim Boubacar Keïta stopped off in Ouagadougou on his way home from a summit in Nigeria to show his support for Burkina Faso after Friday's attack.
"There can be no question of people coming to kill with impunity in Burkina and then finding safe refuge in Mali -- certainly not," Keita told reporters as he stood alongside Burkina President Roch Marc Christian Kabore.
"So this will be one of the things we will look at in the coming days."
Mali's vast arid north is home to Al-Qaeda-linked groups who seized control of several towns before being dispersed by an international intervention in 2013.
The Islamists were never defeated, only displaced, and they continue to mount regular attacks, with large areas of northern Mali outside of government control.
"Their ability to move across borders is clear and we will do whatever we can to even things up," Keita said of the jihadists.
In January this year, 30 people were killed when fighters from Al-Qaeda in the Islamic Maghreb attacked a hotel and cafe popular with Westerners in the heart of Ouagadougou.
Senegal President Macky Sall (left) sits with the President of Mali Ibrahim Boubacar Keita during the ordinary session of the ECOWAS heads of state and government in Abuja, Nigeria on Saturday.