When he steps down next week President Muhammadu Buhari will be leaving Nigerians less secure, poorer and more in debt than when he came to office in 2015.
The former military ruler became president after winning a momentous election which saw the defeat of underperforming incumbent Goodluck Jonathan.
Riding a wave of optimism that change was possible, he was supported by a powerful coalition and had the reputation of being a hard-man soldier, who would get things done.
After Mr Buhari's brief stint in charge in the 1980s, his second coming was on the back of promises to curtail the rampaging Islamist insurgency in the north-east and tackle widespread corruption.
He is the last of a generation of British-trained military men who went on to govern the country.
But the 80-year-old's two four-year terms have left many disappointed.
There have been gains in tackling Boko Haram and other extremist groups in the north-east, aided by improved military hardware from the US.
While the groups still carry out attacks on communities and military installations in the region, it is a big improvement from the years when they operated freely and controlled a large portion of Nigerian territory.
Mr Buhari also utilised Chinese loans to upgrade the ailing road and rail infrastructure, building a new port in Lagos, completing a crucial bridge in the south-east, and passing important electoral and oil-sector laws.
But whatever gains have been recorded in the north-east against the Islamist militants have been eroded by the emergence of equally violent groups in other parts of the country under his watch.
Clashes between farmers and cattle herders from the Fulani ethnic group, which had simmered for years, were allowed to boil over into deadly armed confrontations with an ethnic element, as the government ran out of ideas to solve the problem of where animals could graze.
Mr Buhari, a Fulani from northern Nigeria, was accused of bias in the conflict and his proposal of grazing reserves for the herders were rebuffed by powerful southern state governors who saw it as a land-grabbing tactic.
Some of the armed groups created by the farmer-herder crisis have since transitioned into violent motorcycle-riding bandits targeting communities in the north-west and central states. These groups have helped turn a lucrative kidnap-for-ransom business into a behemoth that now extends countrywide.
It took hold during the first decade of the century when oil workers were kidnapped in the Niger Delta and blossomed under Mr Buhari's watch as the targets changed.
For instance, thousands of school children were abducted between December 2020 and September 2021, according to the UN's children's organisation, Unicef. That eclipsed the 270 girls seized from a school in Chibok who made global headlines in 2014 - a crime that was a crucial factor in Mr Buhari defeating Mr Jonathan.
"I thought that as a former military ruler he would have the solution to Nigeria's security challenges," Musa Ahmadu a farmer now living in the north-western state of Kano, told the BBC.
Mr Ahmadu, originally from the president's home state of Katsina, abandoned his land and fled to neighbouring Kano alongside thousands of others because of the activities of armed groups in the region.
Many also believe that Mr Buhari has mishandled the situation thrown up by separatist leader Nnamdi Kanu.
Mr Kanu heads the Indigenous People of Biafra (Ipob), a group seeking secession in the south-east which is proscribed by the government.
He is a charismatic figure with a huge appetite for sensationalism which he fed devotees via his internet radio station.
Ipob was largely ignored by many Nigerians until Mr Kanu was first arrested for treason by the Buhari government in 2015. A subsequent state-sanctioned attack on his home marked the beginning of an armed confrontation that has spiralled out of control, claiming hundreds of lives in the process.
After escaping in 2017, he was abducted in unclear circumstances abroad and returned to Nigeria in 2021 to face trial. A judge has ordered his release as the process of his return was illegal but authorities continue to hold him.
These security challenges made many question Mr Buhari's handling of a sector that was supposed to be his area of expertise.
"I am surprised at the level of embarrassment he has brought to his constituency, the military, despite all the promises he made," said retired Colonel Hassan Stan-Labi, a security analyst.
"How can you fail in your own area of specialty?" he asked.
The countrywide insecurity under Mr Buhari has largely been muted in the oil-rich Niger Delta where oil-militants and sea pirates held sway in the past.
But that peace seems to have coincided with a period of large-scale oil theft, with the government accused of looking away while different groups in the region steal crude from the pipelines. This led to Nigeria's production plunging to a 30-year low in 2022.
The shocking discovery last October of a kilometres-long pipeline used to steal oil was described by commentators as "nearly impossible" without help from authorities.
In one location, thieves built their own 4km-long pipeline through the heavily guarded creeks to the Atlantic Ocean. There, barges and vessels blatantly loaded the stolen oil from a seven-metre rig visible for miles on the open waters.
That theft on such a scale happened directly under Mr Buhari, who also doubled as Nigeria's petroleum minister, undermined his claim to be fighting graft, Salaudeen Hashim of anti-corruption NGO Cleen Foundation, told the BBC.
Mr Buhari's integrity was also impugned by his frequent medical trips to the UK despite spending large sums to refurbish a clinic in the presidential villa.
This lack of transparency "drained taxpayers' monies, encouraged illicit financial flows and other corruption-enabling activities the administration preached against", Auwal Rafsanjani, the head of Transparency International in Nigeria, told the BBC.
Mr Rafsanjani scored the administration four out of 10 in fighting corruption, and said Mr Buhari's appointment of people with ongoing corruption cases to his cabinet and his wife's long stays in expensive Dubai homes "contravened best practices by an administration that was fighting corruption and mismanagement".
As he leaves, Mr Buhari's handling of the Nigerian economy will most likely be remembered for his botched attempt earlier this year at redesigning the local currency.
An otherwise rudimentary exercise descended into chaos as scarcity of the new naira notes, which have now almost disappeared, resulted in untold hardship for millions in the country who relied on cash for basic needs.
"The small business we were doing was destroyed by that man," said a university graduate in Abuja who made money by supplying banknotes to her customers before the cash crisis.
Her anger was fuelled by a common problem in Nigeria - a lack of work among educated young people.
Currently one in three Nigerians who want to work are unable to find a job. Before Mr Buhari took over that figure was less than one in 10.
The government has blamed a drastic drop in oil prices in its early days, the Covid pandemic and Russia's war in Ukraine.
But some of its policies, such as currency restrictions and closing the land borders to boost local production, have contributed towards record inflation that has made millions poorer and depleted a once burgeoning Nigerian middle-class.
Last week, with the end in sight, Mr Buhari pleaded with lawmakers to hurriedly approve an $800m (£640m) loan from the World Bank. Nigeria's public debt could pass $150bn this year - when he took over it stood at a little over $60bn.
His borrowing spree has drawn warnings from the World Bank that Africa's largest economy was using 96% of its revenue to service debts.
But the huge debt has been defended by the administration who say it is within acceptable limits, pointing to cash payments to poor people as justification for some of the loans.
"These welfarist interventions give a window into the kind soul of the president, a man some people have not bothered to discern, dissect and decipher," presidential spokesman Femi Adesina wrote last week.
Like him, many in the administration insist it has had a good eight-year run. Although both he and his wife have apologised for not delivering on promises made, Mr Buhari has said that he tried his best.
"I want [Nigerians] to analyse how things were when we came in and how they are when we're leaving," he responded when asked about his legacy last year.
The fact is that Nigerians were safer, better off and less in debt before Mr Buhari took over, and many will remember him for presiding over the toughest eight years they might ever face.
Uganda’s anti-gay law fuelling abuses, rights groups say
There’s no point having good machines with good techniques if health doesn’t reach the public – Radiation Oncologist
Republicans make their case at Biden impeachment inquiry
We are on course to achieving our registration target – EC
85-year-old battling for her life after being assaulted for witchcraft
Choosing Ghana’s next president: A call for meaningful change and accountability
Police on manhunt for siblings who allegedly murdered 60-year-old woman over witchcraft accusation
Gabon to decide on transitional period next year
The accident wasn’t normal; those behind it know themselves – Wendy Shay
Lizzo requests dismissal of former dancers’ ‘ridiculous’ harassment lawsuit
Over 400 pupils stranded as rainstorm rips off roof of classroom block
Burkina Faso detains officers amid coup attempt investigation
Livestream: PM Express discusses impact of economic crises on banking
Merging NIB, ADB won’t solve any problem – Banking Consultant
NIB MD managed bank from Canada via zoom for close to a year – Isaac Adongo