Hours before Boko Haram invaded the northeast Nigerian community of Gwoza in August, the Nigerian army left town. Members of the Islamist militant group proceeded from house to house killing men, boys and even babies.
Desperate, Maria Ibrahim dressed her six sons as daughters and fled. As she hurried to safety, she saw eight policemen gunned down by the extremist fighters, who yelled "God is great" as their bullets struck home.
Northerners like Ibrahim feel profoundly betrayed by the government of President Goodluck Jonathan, which began taking decisive action against Boko Haram only a few months before Saturday's presidential election.
The vote, pitting Jonathan and his People's Democratic Party against the opposition All Progressives Congress led by his 2011 foe, former military ruler and northern Nigerian Muslim Muhammadu Buhari, is considered too close to call. If Jonathan is defeated, partly because of widespread anger over his failure to take on Boko Haram years ago, the first democratic transfer of power in Nigerian history would be in the offing.
Ibrahim, 30, and many other northerners see the balloting as the first hope for change they've seen in a lifetime.
"Honestly, we feel totally abandoned by the government," said Ibrahim, wearing a hot pink hijab, sitting with other refugee women in the city of Kano. "When Boko Haram came, the soldiers were fleeing with all their guns and military gear.
"I need to vote for good leaders who can put an end to this madness. When we were in dire need of protection, Jonathan never cared about us. Because of what he's done to us, the way he never cared about our lives, I've actually started to hate him."
At least 1,000 civilians have been killed by Boko Haram this year, according to Human Rights Watch, and at least 3,750 died last year. Other estimates suggest at least 13,000 people have been killed since 2009.
Fanta Umaru, 28, was pregnant when she fled the Boko Haram invasion of Gwoza for Kano along with her family. In the confusion, her brother became lost and ran back to Gwoza, hiding in a vacant house. He was discovered by Boko Haram gunmen and killed.
"We feel we have no government, because if there was an effective government we would not be in this situation," she said, as she bounced her bare-bottomed 6-month-old baby on her lap. Umaru plans to vote for Buhari, who she believes would restore adequate security, and sees Jonathan as "too weak a leader."
"We lost our homes, we lost our livelihoods, we lost our relations and friends because he was not a good enough leader to fight and protect our lives," she said.
Northern Nigeria was already a Buhari stronghold, but now Jonathan is also facing voter discontent in the southwest, where many complain of corruption and poor governance. The PDP, meanwhile, has questioned Buhari's health, has accused the 72-year-old of dictatorial tendencies and corruption and has suggested that his party backed Boko Haram for political gain.
Most worrisome is that neither side seems ready to accept defeat, causing worry about of disputed results and subsequent violence. The outcome will either help cement democracy in Africa or send it into retreat.
"The world is watching, the continent is watching, Nigeria's neighbors are watching this election," the U.S. assistant secretary of State for African affairs, Linda Thomas-Greenfield, told reporters last month.
Although the 2011 vote was declared generally free and fair by observers, at least 800 people were killed after Buhari rejected the results and his supporters rioted, dragging opponents from their houses and killing them. Earlier elections were tainted by widespread violence, thuggery and blatant theft of ballot boxes. Some are pessimistic about the chances of a smooth transition, should the government lose.
There have been dire opposition warnings that Jonathan and his advisors would shelve the election indefinitely (the electoral commission already delayed it for six weeks because of security issues); sack the head of the independent election commission; stage the capture of a fake Boko Haram leader who would say that he was paid by Buhari; or arrest opposition leaders. None of that has happened.
Jonathan, meanwhile, promised that Boko Haram would be crushed and its leader, Abubakar Shekau, caught before the election, and more than 200 missing schoolgirls abducted from the town of Chibok by the group last year would be recovered alive. None of that has happened either.
Boko Haram, however, has suffered a series of major defeats in recent weeks, pushed back to a narrow strip of Borno state and the loss of hundreds of fighters. But the involvement of armies from neighboring nations rubbed in the humiliation that Nigeria's military couldn't do the job, and reminded voters of just how long it took Jonathan's government to seriously tackle the threat of Boko Haram.
Many Nigerians are optimistic that the balloting will be fair because of the introduction of electronic voter cards. Many fear that if there's a violently disputed result, the military, which ruled the country for decades, might move in.
"The big fear is that this election is coming at a time of very low oil prices and political uncertainty. In Nigeria's past this prompted military intervention on a pretty frequent basis," said Tara O'Connor, head of a business and political risk analysis company, Africa Risk Consulting.
"But the military has been reformed. I think those days are over. Probably the worst-case outcome is constant, repetitive legal challenges that could add to the paralysis that Goodluck Jonathan has already brought to the political process."
Jonathan has the advantage of incumbency and resources, including preelection payments of cash to voters. But he faces an electorate fed up with decades of poor governance and corruption, topped off by recent all-day lines for gasoline coupled with electricity outages — and no fuel for the generators that keep refrigerators and lights going.
The PDP was shocked last month when survey group Afrobarometer said the election was too close to call, a change from 2011, when Jonathan wound up with almost 59% of the vote compared with 32% for Buhari.
The poll also found that 70% thought the government was doing badly on the economy and even more were dissatisfied with the government's handling of corruption.
Policy issues bear little weight in a nation where voters tend to focus on regional, ethnic and religious factors. But for the first time, the personalities of the candidates are emerging as an issue, with Buhari seen as a strict, disciplined military-style leader, potentially tough on corruption, and Jonathan viewed as ineffectual.
Abubakar Mohammed, a label maker in Kano, is the sole breadwinner for 40 people in his house, including 32 relatives who fled Boko Haram. Earning $90 a month, he relies on the charity of neighbors to feed them. Like many Nigerians, he expects little from the nation's leaders.
"This is a government that cannot provide basic infrastructure, like water and power supply. Any government that cannot do this is of no use, and of course there's the insecurity as well."
But for the first time in his life, he dares to hope for change.
"There's a real chance that there'll be change for the better. Nigeria has never had it so bad in its history, and people are really tired. They're yearning for change."