Officials have reportedly revealed the dog belonged to a guest at the wedding in the town of Belbelo, Nigeria.
But the pooch intercepted the suicide bomber, described by local officials as a female in her teens.
The bomber had been attempting to infiltrate the crowd when the dog arrived to save the day.
The interception triggered the girl to detonate the bomb while it was strapped around her body.
The blast killed the bomber and the dog, Nigeria police spokesperson in Borno, Victor Isuku, confirmed to local media.
The incident occurred a few hours after the killing of three suicide bombers in two foiled suicide attacks in nearby towns and is the latest in the region of northeastern Nigeria.
One civilian was injured in that attack, the website said, and a truck was partly damaged.
Young girls are being used in suicide bomb attacks in the region of the country around the town of Maiduguri by the Boko Haram jihadist insurgency.
In December, two girls aged 7 and 8, reportedly tried to blow up a market in Maiduguri.
click here to read more