It was a case of instant captivation when Shagari first heard Boko Haram's founder deliver a jihadi sermon a decade ago.
Gripped by the message, Shagari swapped life as a father and electrician to join the militants and rose rapidly through their ranks, his ascent mirroring the group's own growing stature.
He took easily to the extremism and brutality.
"If I saw a man wearing something like shorts and a T-shirt, I would be ready to finish him because of his clothing," the 42-year-old told Reuters in an interview.
The die-hard recruit was rewarded with rapid promotion — elevated from researcher to recruiter to regional leader — as he joined the fight to carve out an Islamic caliphate in Nigeria.
Boko Haram has killed about 20,000 people and uprooted 2.7 million since unleashing its brutal insurgency eight years ago.
The army has retaken much of the territory once held by Boko Haram, yet the group continues to carry out bombings and raids in northeast Nigeria, as well as in Cameroon, Chad and Niger.
Their attacks have ramped up in recent months, with suicide bombing, kidnapping and rape used as everyday weapons of war.
Once Shagari was a willing foot soldier, ready to kill for the cause. But now he has once more chosen a new direction, the product of a radical government program to reach out to Boko Haram's top militants in the hope of reforming its underlings.
Man of peace?
"My views on killing changed," said the one-time militant, a married father of seven from northeast Nigeria.
Shagari asked for his current location and full name to be withheld for fear of retaliation from Boko Haram, having cut ties with the insurgents as part of his new life.
The about-turn had its roots in 2011, when he was arrested for his role in the insurgency and jailed in the capital Abuja.
Held with fellow group members, Shagari was segregated from other prisoners. For three years, life was joyless. Then, in 2014, a state-run deradicalization project changed everything.
"The discrimination stopped," Shagari said. "People started interacting with us, and we started going out of our cells.
"We were treated like human beings," he added. "I was able to do away with all the ideology and become a normal person."
Since his release from prison in 2015, Shagari has helped to deradicalize others, and enrolled in secondary school with the aim of going to university and working in conflict resolution.
Engaging with such high-ranking Boko Haram members is key to reforming its followers and reintegrating them into society, said Fatima Akilu, the psychologist who ran the state program.
"We needed Shagari to get through to the other Boko Haram members [in prison] because he was their leader," said Akilu, now executive director of the Neem Foundation, an anti-extremism group. "We could not have done it without his help."
Belonging and brotherhood
Poverty is often seen as the main driver for those joining Boko Haram, yet a sense of belonging, brotherhood and power tend to be bigger factors — especially for young people, Akilu said.
"Boko Haram's idea of the caliphate fired the imagination of a lot of young people," Akilu said.
"They [young people] want to be part of history, to form their own society and way of life ... to wield a lot of power and reimagine the world in a way that they want it," she added.
Deradicalizing people who buy into Boko Haram's ideology — unlike those who join the militants for money or out of fear — therefore presents a huge challenge for the Nigerian government.
Nigeria last year launched a new program to rehabilitate repentant fighters, offering support and skills rather than locking them away. Officials could not be reached for comment.
For Shagari — who says he has survived three assassination attempts by Boko Haram for refusing to rejoin the group since his release from prison — returning home has been far from easy.
Although he values his freedom and education — and is proud to have enrolled six of his children in school — Shagari said the temptation to go back to Boko Haram has often proved strong.
"If not that I had changed wholeheartedly, I would have gone back because of the tough times," he said. "Some people did ... because of lack of a single penny. Some have been killed."