THE road junction bears no sign that marks a border: no custom house nor passport office. On one side is a burnt-out brick building and on the other an unkempt meadow. Both are on Nigerian soil according to official maps. Yet reality is different. Down what locals call the cattle road lies another country. Between the cities of Gombe and Maiduguri the tarmac is in the hands of Boko Haram.

In recent months the extreme Islamist group has taken over swathes of north-east Nigeria. It controls at least two dozen towns in Borno state and parts of the neighbouring states of Adamawa and Yobe. Gwoza, a hill town of almost half a million people, is the capital of its self-declared caliphate. Few outsiders dare to visit. A trader who recently returned after making a delivery approved by the militants described it as an abattoir after hours: “cold, calm and full of blood”.

The group routinely slaughters unbelievers as well as Muslims, establishing its writ through fear. In September a horde of insurgents fell on the verdant villages of Kubi and Watu in Adamawa state and torched more than 500 houses. Arriving in the early morning they spent the day looting and killing among scorched corrugated-iron roofs. Bodies were dismembered and left for vultures. The security forces never turned up. “We have not seen them in a long time,” says a surviving villager, Ahmed Huda. “We are alone.”

On October 17th senior government officials claimed to have agreed a ceasefire with the group, and to have extracted a promise that more than 200 schoolgirls abducted earlier this year in the town of Chibok would be released. But the girls have not been freed and attacks by Boko Haram continue. In any case, the deal would have entailed a swap of prisoners, including militant leaders, which might have stoked the war all the more.

Boko Haram, which started out by assassinating provincial officials from the backs of motorbikes, has become an able fighting force. It conducts complex military manoeuvres reminiscent of those used by the formidable Chadian army. One seasoned observer calls it “a fairly effective commando force”.

The Islamists have looted military garrisons across the region, and now have tanks, armoured personnel carriers, anti-tank weapons and artillery. Boko Haram claims to have downed a Nigerian fighter jet (and has filmed the beheading of the pilot), so it may have anti-aircraft guns, too. The archbishop of Maiduguri speaks of its “inexhaustible boxes of ammunition”. Worryingly, the group’s focus is now on holding territory in the north-east. Along with new weapons and tactics, the group has acquired new members. It may now field 5,000-10,000 fighters in total, perhaps double its number two years ago. Recent recruitment has often been by force, though not much coercion is needed. “What else can the kids do with their lives?” asks a mother in Gombe. Youngsters have few options. Boko Haram feeds, indoctrinates and bloods them in raids. Many of its members fight bravely. “They fail to fear death,” says a policeman, Yusuf Abubakar. “They run into open gunfire.” The group has long financed itself through plunder and kidnapping for ransom. It now also collects taxes at road blocks. The trader who went to Gwoza says he paid about $40 to pass through checkpoints. The group produces slick propaganda videos showing attacks in which its fighters overwhelm barracks and chase soldiers into the bush. The videos also show supposed sharia justice in action: offenders are lashed, stoned or have their hands cut off in front of sullen crowds.

The insurgency has driven about a million people from their homes and may have killed 13,000 in the past five years. At a newly erected refugee camp in Yola, Adamawa’s capital, hundreds of children wait for food. Many have seen parents or siblings killed. “My mother was burned in our house,” says eight-year-old Ramin. “My brother tried to run but they forced him back inside.”

Agriculture has collapsed in parts of the north-east. Fields are barren. Markets are noticeably empty even in areas still under government control. Public schools have been closed for half a year. Many hospitals have run out of drugs.

That is one side of a strangely bifurcated country. A very different Nigeria exists a day’s drive away. While the north is imploding, the south is booming. Lagos, the commercial capital on the coast, is a magnet for investors lured by explosive growth in Africa’s biggest economy. The World Bank recently lauded Nigeria for making it easier to set up firms. The commercial metabolism is phenomenal. Your correspondent received a letter under the door of a well-kept hotel room from the general manager offering the opportunity to buy shares in the hotel’s holding company.

Though oil is the country’s main export earner, natural resources make up only 14% of GDP. Factories are now running at about 53% of capacity, up from 46% last year. McKinsey, a consultancy, suggests that GDP could grow by more than 7% a year for the next 15 years, making Nigeria one of the world’s 20 biggest economies.

Much is due to government reforms. Investment in the electricity sector is starting to turn on the lights. New regulations may kick-start growth in mortgages for homeowners. Inflation has been brought down from more than 13% in 2010 to 8.3%. The government has helped launch a private-sector development bank and is setting up a conditional cash-transfer system to boost the fight against poverty.

And yet, while much of the economy in the south-west is coming to life, politics in the north-east is dying. Boko Haram has risen partly because the state has been hollowed out. Nigerian institutions occupy impressive buildings but the state fails to enforce rules and civil servants and judges can be bought.

The government has racked up some successes. On October 20th Nigeria was declared free of Ebola after a well-run operation to trace and isolate 19 people infected with the virus. Yet state failure is evident when it comes to security. Kidnappings for ransom are rife: celebrities and clergymen are plucked off the street in daylight. Hundreds of people are killed every year in land disputes. Thieves siphon off as much as a fifth of the country’s oil output in the Niger delta. Piracy is common.

Such rampant criminality continues to infect politics. Gangsters aid politicians by intimidating opponents. In return elected officials share out funds plundered from state coffers. Two years ago KPMG, a global audit firm, named Nigeria as the most fraud-prone country in Africa.

Corruption blossomed in the late 1960s during the Biafran civil war, when money flowing into regimental coffers went into private pockets. The generals never lost their appetite. When they allowed a return to democracy 15 years ago the civilian political class adopted the army’s habits. What started as a nibbling at the system has turned into all-out gobbling. Earlier this year Lamido Sanusi, the internationally-respected governor of the central bank, accused the state oil company of failing to account for $20 billion in revenues. He was fired for his pains.

The president belittled the problem in May when he said corruption was not the same thing as stealing. Yet it means not only a loss of state funds but also a corrosion of decision-making. Nigeria’s federal parliament has for years refused to approve an oil-industry bill that would boost investment in oilfields and hence production. But members prefer to keep things as they are: many of them do well from local cartels’ handouts. Oil output is stagnant when it could double.

The poor and angry north

Inequality is also starkly regional (see map). If they were independent countries, some of Nigeria’s northern states would rank bottom globally in terms of development, even though the country is the seventh-biggest oil producer in OPEC. Nowhere else in the world are more children out of school. Fewer than 5% of women in some parts can read or write. Estimates put three out of four residents in the north-east below the poverty line, around twice as many as at the southern end of the country. “Boko Haram is a reflection of the deeper crisis in the country,” says a former teacher at a military academy. Its rise is fuelled by poverty as well as the brutality and incompetence of the security forces.

Extrajudicial killings account for thousands of deaths in the north. Revenge is a common reason for commando raids. Abuse in detention centres is routine. Some police stations have what is informally known as an “O/C Torture”—Officer in Charge of Torture—who handles interrogations. Dozens of bodies, many bearing the marks of torture, turn up at the main morgue in Maiduguri following police sweeps. Some prisoners appear to have been starved to death.

In the field the army lacks the equipment and morale to give chase. Boko Haram destroyed much of the air fleet in a raid last year and is now free to ride around in large convoys unmolested from above. The generals have asked Western countries for new helicopters and other equipment but were told first to alter their tactics, respect human rights, create proper supply lines and learn counter-insurgency skills. America, among other countries, cannot offer Nigeria training and arms until its army respects human rights.

Hapless at chasing insurgents, the army is nonetheless skilled at extracting bribes. Troops sent to the north-east to fight Boko Haram run checkpoints as shakedown spots. On the road between Maiduguri and Damaturu drivers are stopped every 10km (6 miles) or so and are asked for money by soldiers. In some cases the bus driver collects the bribes from passengers before leaving and hands them over to speed things up. “You pay according to how much luggage you bring,” says a passenger.

The soldiers are only following the example of their generals, many of whom retire as millionaires. A budget supplement of $1 billion to fight Boko Haram is seen by some as a little more than a new trough for greedy officials. So little of the money reaches front lines that desertion is common. Troops frustrated by a lack of food and ammunition have shot at their own officers. Several have been sentenced to death by firing squad for mutiny.

One expert says the army “is close to being shattered”. It has about 18,000 troops in the north-east, an area populated by 10m widely dispersed people. About half the force, amounting to most of the combat-capable troops in the 60,000-strong army, is squatting in Maiduguri.

Government officials insist that Nigeria does not face an existential crisis but rather struggles to communicate its successes abroad. The finance minister, Ngozi Okonjo-Iweala, complains that “the international media tend to have one line of good news on Nigeria and everything else is bad.” She says the country is getting a grip on its problems. The army was long neglected in favour of development. “We chose butter over guns,” she says. That is now changing. President Goodluck Jonathan has launched initiatives to boost development, schools and health care in the north-east. He speaks of “turning the tide”.

The president has never been short of speeches or initiatives. But his critics fear he is no longer able to effect wholesale change in a broken state. Nobody can predict when Nigeria might tip over into chaos. But that day seems to be coming closer.