Buhari’s reaction was contained in a statement by his Senior Special Assistant on Media and Publicity, Garba Shehu.
While commiserating with the families of the victims, Buhari urged all Nigerians to remain vigilant especially in public places.
He said his administration remained committed to securing Nigeria from terrorism and violence.
“I am dismayed by the news of a bomb attack on innocent worshipers in a mosque in Maiduguri this morning.
“This attack is yet another sign that Boko Haram is a mindless and godless group that in no way represents true Islam.
“I sympathise with all who lost family and loved ones in the attack, and with the government and people of Borno State.
“Nigerians should please not let down their guard. Vigilance should continue to be a priority, especially in public places.
“The government remains resolute in its commitment to securing Nigeria from terrorism and violence.”
It would be recalled that the Nigerian military, earlier confirmed the attack by two female bombers using twin person-borne improvised explosives in Ummarari village near Molai, outskirts of Maiduguri metropolis, Borno State, Wednesday morning.
The attack claimed the lives of 22 people while 18 others sustained various degrees of injuries.
According to Colonel Sani Kukasheka Usman, the Acting Director Army Public Relations, the first attack targeted a mosque, while the second blast about 50 metres away, a few minutes later.
“Troops, security agents and care givers have been mobilized to scene, while the wounded have been evacuated to Molai General Hospital for treatment.
“The troops, security agents and the Civilian JTF have secured the area and are combing the environment for possible clues.
“While we commiserate with the families of the victims of this dastardly act, we wish to reassure the public that we would continue to rout the remnants of the Boko Haram terrorists wherever they may be hiding. We will not rest on our oars until all those that masterminded this latest heinous and other similar crimes are apprehended and brought to justice.
“Meanwhile, we implore the members of the public to be more security conscious, cooperate with the troops and security agencies. They should also please report any suspicious persons, objects or happenings to troops or security agencies at all times.
“You are please requested to disseminate this information to the public through your medium.
“Thank you for your kind and usual cooperation,” the statement said.