The visit to Nigeria by German President Gauck has been overshadowed by a double suicide bombing. The blasts, 500 kilometers (311 miles) from the president's location, highlight the challenges his Nigerian hosts face.
Nigerian President Muhammadu Buhari and his German guest President Joachim Gauck condemned on Thursday the double suicide bombing by suspected Boko Haram militants which left 58 people dead in a camp for displaced people in northeastern Nigerian on Tuesday morning.
The suicide bombers, young women wearing veils, had passed themselves off as refugees in order to gain access to the Dikwa camp lying some 90 kilometers (56 miles) from Maiduguri, capital of Borno state.
The delay in relaying news of the attack was attributed to the destruction of telecoms masts by the militants which caused a breakdown in communications.
Political analyst Ibrahim Aliyu told DW blamed the attack on the "laxity of the Nigerian military" who, he said, were not doing their job properly.
Following the Dikwa attack, the Nigerian authorities ordered tight security at all other displaced persons' camps in the country
The attack could have been in retaliation for a Nigerian army raid last week on three villages near the town of Kalabalge, one of Boko Haram's strongholds in Borno state. Dozens of militants were killed.
The German president paid tribute to efforts by Buhari, who has been in office since May 2015, to defeat the militant Islamists. However, he cautioned that "successes in fighting terrorisms cannot be sustained without development and good governance."
Help from Europe
Gauck said the European Union was contributing $50 million (44 million euros) to the fight against Boko Haram. German aid for the more than two million internally displaced people in Nigeria would continue, he said.
Buhari said that Boko Haram was "no longer what it once was." There were no longer any local government areas over which it had control, he said.
Buhari was referring to swathes of territory lost to the militants in 2014 which Nigeria's military, supported by troops from surrounding nations, has succeeded in recapturing in a counter-insurgency launched last year.
But attacks such as the one which coincided with the German president's visit would suggest that Boko Haram is not a spent force.
As well as struggling with chronic insecurity, Nigeria is also grappling with a dramatic fall in the price of oil on international markets. Falling oil revenues mean that Nigeria will have to place more emphasis on natural resources other than oil and agriculture, Buhari said.
Gauck offered Buhari help from German firms operating in these sectors.
Gauck flies to Mali on Friday where he will visit German troops who are training members of the Malian armed forces to fight Islamist militants in the north of the country.
Muhammad Al-Amin contributed to this report