Officials ordered everyone off the streets and imposed an around-the-clock curfew to restore order in the targeted city of Kaduna, as rescue workers raced to care for the dozens of wounded.
Police said the first attack was carried out by a suicide bomber on the convoy of Sheikh Dahiru Bauchi, a cleric who has fiercely criticised Boko Haram's deadly five-year uprising.
The blast which went off at about 12:30 pm (1130 GMT) killed at least 25 people, but Bauchi escaped unhurt, Kaduna state police chief Umar Shehu said.
Buhari, who was not injured, has also been threatened by Boko Haram, which accuses him of betraying Islam by accepting democratic rule.
More From This Section
While there was no immediate claim of responsibility, the circumstances pointed directly to the Islamic extremists whose uprising has increasingly threatened the stability of Africa's most populous country and top oil producer.
Kaduna state Governor Mukhtar Ramalan Yero placed his capital under a "24-hour curfew... Aimed at forestalling (the) breakdown of law and order," following the attacks, his spokesman Ahmed Maiyaki told AFP.
Bauchi was travelling in an open-roofed truck in Kaduna's Isa Kaita area when the bomb off. Well-wishers had gathered on the roadside to greet him, according to witness Mustapha Sani.
Sani said the blast splattered the blood and flesh of the bomber and his victims on the cleric's convoy.
Boko Haram has sought to brand Nigeria's senior Islamic leaders as traitors for submitting to the authority of a secular government, currently led by a devout Christian, President Goodluck Jonathan.