Toward the end of my stay in Nigeria as a correspondent for The Economist in 2007 and 2008, I asked my driver, an older Muslim man named Bello who was perhaps my most trusted friend there, who he blamed for Nigeria’s corruption woes. “Our religious leaders,” he told me. “If they told our politicians to stop, they would.”

There are no two ways about it: religion and politics in Nigeria do mix. The country’s troubles are visible and pronounced—poverty lurks on every street corner; beggars crawl through the streets in Kano, where a lingering polio epidemic has left them crippled; natural resources line some people’s pockets and other people’s soil with the thick sheen of oil. So sometimes out of faith, sometimes out of desperation, and sometimes merely for survival, Nigerians have taken political problems to the mosques and churches. In the predominantly Muslim North, shari’a law has been in place for a decade, implemented by a region so tired of lawlessness that Qur’anic law seemed an enlightened answer. In the poor slums of Lagos, churches provide the services that the state would not—could not—ever provide.

Politicians have been quick to follow their constituents’ retreat to religion. They are conspicuously present at churches and mosques, allied with specific pastors and imams. They raise constituencies among their religious peers, and pour patronage on their fellow faithful. Of course, some of this is quite typical—US presidents have always been candidly religious and often popular among those who share the same faith. But in Nigeria, it does go deeper, and this is what Bello had meant: Politicians support the religious institutions financially, rendering religious leaders incapable of criticizing them—especially when they have grown corrupt. (After all, who bites the hand that feeds them?) Political problems take on religious dimensions; manipulated by politics, poverty among the faithful of one religion can be blamed on the depravity and greed of another. The unwritten ruling-party agreement that promises a rotating presidency—eight years for the Muslim North, then eight years for the Christian South—only legitimizes the country’s religious schism.

The divide between faiths can absorb political tension for a while, but more and more often, it boils over, as it did with the massacres in Jos that began in January and continued in March of this year. Early in the pre-dawn March morning, long before the sun rose and even before the morning prayers began to blare from the local minarets, men with machetes, clubs, and guns stormed villages outside of Jos, slaughtering hundreds. This time around, many of the victims were Christians and the perpetrators Muslims of the Fulani ethnic group. But it has often been the other way around. No matter who is wielding the stick and who stands helpless at the door to their death, the horror is the same: unthinkable and incomprehensible to the outside world, and indeed, to many on the ground as well.

It’s not unthinkable, however. And that is the harder part to hear.

Understanding why means taking a look at just how dreadful the political troubles that plague everyday life in Northern Nigeria are today—which is precisely why this retreat to politicized religion has happened. Walking down the streets in the cities Jos and Bauchi and then venturing into the rural villages, dust and mud are the overwhelming hues. The land is difficult, not just because of the droughts slowly creeping their way further and further south from the Sahara, not just because the crops are subsistence and could rarely make it to the market without spoiling, and not just because there is income inequality—poverty—among all but the very top few. The land is difficult because it is worse than lawless; it is selectively lawed.

A poor man can be swept off his feet to jail where he will wither away without lawyer or trial or light of day. A rich man can buy his freedom, though he’d likely never be arrested in the first place. He can shame the (usually poor) policemen into admitting that their guns have no bullets and their threats have no depth compared with his pockets. When a poor man steals bread, he is taken to the run-down concrete police station, stripped of his clothes, and marched through the street in shame for his guilt. (For any man—but particularly a young, Muslim man—there is no greater defeat.) When a rich man skims off the top of his enormous business deal, however, he buys a new house.

So too do the resources unevenly flow. Nigeria is a wealthy state; objectively, there should be no reason for the largest oil producer in Africa to be receiving any sort of development aid. In fact, however, to the vast majority of Nigerians, the government doesn’t exist. Health care, education, and infrastructure are effectively “privatized”—a nice euphemism for the fact that they don’t exist. In short, in Nigeria, you are on your own.

For years, this has bred the sort of suffering that makes people not just uncomfortable, but desperate. Grasping at anything that brings order to an otherwise uncertain life, there has been no more logical receptor than religion, literally the saving grace of many in the country’s arid North. Churches and mosques will provide more services and support than the government could ever hope to do. Schools, particularly Qur’anic ones, which meet everywhere from elaborate mosques to dirt backyards with rough canvas roofs, are leaps and bounds above their state peers, though this still is not saying much. People have retreated into the churches and mosques, seeking order, comfort, and support in a world without any of the three.

Of course, this is far from the only reason that Nigerians are religious. The religious depth of the country dates back far longer than recent times. Northern Nigeria has been largely Muslim since Usman don Fodio led a jihadist crusade there in the late 18th century, establishing the regional Sokoto Caliphate meant to govern the region, an office that still exists (if more symbolically) today.

Likewise, Christian missionaries are as old in Nigeria as the British colonial experiment. The two religions were, for many decades, separated by an artificial line drawn by the colonial power that cut off the supposedly Muslim North from the supposedly Christian South. Such artificial lines have a way of becoming true if they are kept long enough, and that’s exactly what happened. Religions were taken on as identities in both separated regions, and suspicion of the other side grew, not least because the British built the army and the state largely with Northerners.

The Church and the Mosque became obvious sites of strength when the state was in retreat. Never was this more obvious than in 2000, when many of the states in Nigeria’s north began to implement shari’a law, a move that most hoped would bring order to the courts and a measure of security to the streets. Qur’anic judges promised a set of rules that were drawn from principle, rather than the corruption that often ruled local civic courts. Shari’a was supposed to protect the poor, and expectations were high. Those who worried about religious radicalization should have been reassured; in fact, what was sought more than anything was the legal moderation that the Nigerian state could not itself provide. In short, shari’a law was supposed to help.

But in the ten years since the laws were implemented, they have become not a means to defend the poor but a tool to persecute the non-elite. A good friend of mine from the North had been imprisoned countless times for a set of plays that he wrote about how shari’a had become a weapon against the poor and a means to entrench the ruling class. He was a profoundly religious Muslim man, and usually his critics were nominally of the same faith too.

Some responded to the failed shari’a experiment in the opposite way that my playwright friend did. Groups like the Boko Haram, the now infamous Islamist sect that called for a fully Islamic state and turned violent in late 2009, sunk deeper into their ideologies. Perhaps shari’a had not gone far enough; that’s why things had not gotten better, they reasoned. Perhaps a full implementation of shari’a would mean the end of the corruption that was filtering into religious institutions. Of course, they took it too far. But many of their sympathizers were not ideologues, just plain tired of the status quo.

As Islam has struggled with its own internal corruption backlash, Christian missionaries have begun to push further North, aggressively entering Muslim communities. There have always been Christians in the North, and Muslims in the South, but in Jos and surrounding areas—positioned right in the middle of the invisible North-South line—the mix has become more polarized by competing faiths.

And then finally, there has been the earth, which has itself exacerbated the growing rift that explodes occasionally in bursts of violence. Jos has been the site of much migration in recent years, with many more permanent communities setting up in a region that used to host the semi-nomadic Fulani cow herders. Up to a point, those two communities could live with one another—until things like water, land, and food got scarce. That point has now been passed. There is no real land ownership system in rural Nigeria aside from customary law, so the only way to defend your turf is to do exactly that.

Thus comes the religious violence, bred from an awful situation and making the situation so much worse. Once the first attacks took place, the region began down an almost unstoppable path toward retribution after retribution. When you have nothing to lose anymore, you can only gain by taking away from others what you have lost. Which is where things stand now.

I saw all this with my own eyes in Jos and throughout the North, and frankly, the rest of Nigeria, from the man-packed sidewalks and overpasses of Lagos to the oil-laden creeks of the Niger Delta. There was a profound suffering that overshadowed every aspect of life. There was a profound understanding among everyone I met that, as someone told me before I embarked for Nigeria, anything can happen, and anything could happen. It was a kind of crippling insecurity that rendered life incredibly unjust.

But I learned much about the ambiguity of these things, as much as I sought to explain them and see through the unthinkable. Because in this country where anything can happen, there is surely as much good as bad. There is kindness, generosity, long conversations over tea and charity even among those who have nothing. There is a beautiful solitude to the arid north, interrupted by motorcycle taxis and loud, overstuffed trucks. There is much worth giving thanks for. And that’s what makes it so hard. When you pray to your God in Nigeria, you have much to appreciate and much to ask.