Two explosions have ripped through the northern Nigerian city of Kaduna, killing at least 40 people, police say.
The first explosion targeted moderate Islamic cleric Dahiru Bauchi while the second one targeted senior opposition leader Muhammadu Buhari, a BBC reporter in the city says.
Both escaped unhurt.
Militant Islamist group Boko Haram has carried out a wave of bombings and assassinations in Nigeria since it launched a brutal insurgency in 2009.
It often targets Muslim leaders opposed to its militant ideology. Curfew imposed
Body parts and damaged vehicles lay on the busy Alkali Road in the city centre where the bomb targeting Mr Bauchi exploded, reports the BBC's Abdullahi Kaura Abubakar from the scene.
Kaduna police chief Shehu Umar said at least 25 people were killed and 14 wounded in that blast, apparently caused by a suicide bomber.
Another 15 were killed in the second blast, he said, while an emergency worker put the number at 19.
Mr Bauchi had completed a preaching session in the nearby Murtala Muhammed square, and was driving through the area in an open-roofed vehicle, greeting thousands of well-wishers when he was targeted.
Followers of the renowned cleric reacted angrily, throwing stones at the security forces and accusing them of failing to protect Nigerians, our reporter says.
The security forces retaliated by firing tear gas.
About 90 minutes after the first attack, a second explosion ripped through the crowded Kawo area, targeting the motorcade of Gen Buhari, a former military ruler of Nigeria and a senior member of the All Progressive Congress opposition party.
Gunmen rammed a vehicle into his convoy, firing shots at it, our reporter says, adding that two of Gen Buhari's bodyguards were slightly wounded in the attack.
The state government has now imposed a 24-hour curfew in the city and surrounding areas.
"The measure is aimed at forestalling a breakdown of law and order," said government spokesman Ahmed Maiyaki.
In May, the emir of the northern area of Gwoza, Shehu Mustapha Idris Timta, was shot dead in an attack blamed on Boko Haram.
In January 2013, the then-emir of Kano, Al Haji Ado Bayero, survived an assassination attempt.
Related stories: Death toll of civilians killed in Boko Haram attacks in Nigeria this year reach 2,053