President Goodluck Jonathan, flanked by National Emergency Management Agency (NEMA), Muhammad Sani Sidi (at his right) and Governor of Borno State Kashim Shettima at (center of the picture), gestures as he speaks to internal displaced people from Bag ~ OLATUNJI OMIRIN
Lagos - Muhammadu Buhari, who has claimed victory in Nigeria's most closely fought presidential election, is not a man who is easily put off.
He tried three times previously to become head of state since the return to civilian rule in 1999 and failed on each occasion.
Also read: LIVE: One more state until Nigeria decides
But the tough retired major general who overthrew elected president Shehu Shagari widely seen as inept and corrupt in a military coup in 1983, was determined to lead the country again. And to do it the right way this time.
Buhari, 72, is "exceptionally corruption-free", one former senior military officer told AFP, and in the run up to the vote he declared, "From the day we are sworn in as a government, anybody who abuses trust will be called to account."
Unusually, the devout Muslim did not accumulate much in the way of spoils when he was in power. "I am not a rich person," Buhari told a cheering crowd during the campaign.
"I can't give you a pocketful of dollars to purchase your support. Even if I could, I would not do so. The fate of this nation is not up for sale."
His harsh anti-corruption stance when he was last power made him many political enemies in a country where graft is widespread.
Those 20 months at the top also saw a darker side to the man, with a spike in human rights abuses as he pushed through a series of draconian decrees, including a crackdown on "indiscipline".
Critics of his regime were thrown in jail, among them the Afro-beat music legend Fela Kuti for an alleged currency violation, though most saw his detention as politically motivated.
Buhari was also at the centre of a major diplomatic row with former colonial power Britain after attempting to kidnap and smuggle Shagari's former adviser Umaru Dikko from London to Lagos.
Dikko, who had fled to the British capital after his boss was overthrown, was found drugged in a crate at Stansted Airport.
The British satirical magazine Private Eye lampooned the incident with one of its most famous headlines: "Fly Nigeria, It's a crate way to travel."
In particular, the execution of three young men, found guilty retrospectively of drug trafficking, triggered domestic and international outrage.
It was this bitter authoritarian legacy that his rival Goodluck Jonathan tried turn on him during the election. "No matter how many pretty robes you wear, once a tyrant, always a tyrant," ran one of Jonathan's advertisements over photos of Buhari in uniform, a dinner jacket and ethnic attire.
But Buhari countered: "Before you is a former military ruler and a converted democrat who is ready to operate under democratic norms and is subjecting himself to the rigours of democratic elections for the fourth time."
The former general has himself felt the sharp side of military rule.
He was ousted by Ibrahim Bagangida in a bloodless barracks coup in August 1985, and slipped out of public life.
But he made a return 20 years later as head of a government agency funding development projects with additional revenue from oil sales, where he demonstrated an autocratic but effective style.
"He is not very communicative, he is reticent but quite knowledgeable without flaunting it," said Ayo Banjoko, a Lagos-based political analyst.
"He is imbued with a messianic zeal. He has a rigid and intransigent disposition and he believes this country must and should be purged of its ills, especially corruption."
Buhari's quest for a return to high office saw him seek the presidency under two different political parties in 2003, 2007 and 2011.
He lost out to Olusegun Obasanjo, Umaru Musa Yar'Adua and Goodluck Jonathan respectively before standing again against the southerner.
Buhari complained of gross irregularities in all three polls but won a landslide victory in All Progressives Congress (APC) primaries to take on Jonathan again and the ruling People's Democratic Party.
But although billed by the APC as the man to rid Nigeria of endemic graft and end the Boko Haram insurgency, he has had to face multiple attacks from the administration in Abuja.
He has been portrayed as a religious zealot and it was claimed that he was ineligible to even stand as he could not initially prove that he had finished his secondary education.
But the APC has brushed off the claims as an attempt to divert attention away from the government's record.
In July 2014, Buhari narrowly escaped death after a suicide attack on his car as it travelled through the northern city of Kaduna: 42 people were killed and Boko Haram militants blamed.
Two months earlier, Buhari had criticised Boko Haram as "mindless bigots masquerading as Muslims" for kidnapping more than 200 schoolgirls from northeastern Nigeria. Some analysts however suspect that the bombing may not have been the work of the militants, but a politically motivated hit.