Boko Haram released a video showing some of the kidnapped Nigerian schoolgirls. (Ho/AFP/Getty Images)

Sarah Chayes, a senior associate at the Carnegie Endowment for International Peace, is the author of the forthcoming book “Thieves of State: Why Corruption Threatens International Security.”

A few Ni­ger­ian teenagers who managed to escape are telling their stories: how some 300 of their classmates were wrenched from their sleep at a village boarding school and hauled off in a stampede of trucks and motorcycles. The attack has captured international attention like few terrorist incidents since 9/11.

But amid the pressure to respond to the anguish, the United States is right not to overdo its counterterrorism assistance to Abuja. As has become an unfortunate pattern where terrorism is concerned, officials might reinforce the root of the problem in their impulse to hack off the branch. For much of the responsibility for the rise of the Boko Haram extremist group may lie with the Nigerian government itself.

Officially designated a foreign terrorist organization by the State Department in November, Boko Haram burst into public view in 2009 with a series of attacks on public buildings in northeastern Nigeria. A brutal counteroffensive by Nigerian security services followed, leaving hundreds dead.

The precise structure and membership of Boko Haram and its affiliates, and even the tenets of their extremist ideology, are unclear. Nigerians I spoke with on a research trip late last year unanimously condemned the group’s violent tactics, as well as its focus on imposing a locally outlandish brand of Islam.

Still, it has a real following in the country’s impoverished northeast. “Ninety-five percent of our youth in Borno have a connection to them,” Biye Peter Gumtha, a national assembly member from the region, recently told German radio. “Young men without prospects are open to radical offers.”

With the highest oil production in Africa, ample rainfall in half the country, good soil and resourceful people, Nigeria should be enjoying the benefits of economic growth. But its development outcomes have fallen since an oil boom began in the 1980s. Why so little return on such vast wealth? Because the government has been stealing the money.

In February, Nigerian President Goodluck Jonathan fired his respected central bank governor, who was investigating the disappearance of some $20 billion in oil revenue over a mere 18 months. Jonathan and his network are believed to have siphoned off most of the cash — with laundering help from local and international banks.

As is nearly always the case in severely corrupt countries, high-level looting of this magnitude is part of a system. Government officials down the line take cues from, or have to pay kickbacks to, their superiors. Almost any encounter, including with nursery school teachers and doctors, involves a demand for money. “People feel they can’t get a fair deal,” said Muhammad Tabiu, a lawyer in the northern city of Kano. “They have to bribe. They can’t get justice.”

Many Nigerians describe Boko Haram — at least at first or in part — as a violent reaction to this pervasive abuse. “At the beginning was this cry of justice,” explains Yanusa Zakari Ya’u, director of a nongovernmental organization focused on budget transparency. “The secular institutions were not performing. Boko Haram became popular because they were offering an alternative vision. When the crackdown came in 2009, they said, ‘We were victimized because we were trying to clean up society.’ That may not be real, but they are using that to mobilize people. That’s how they got entrenched.”

At first the group singled out police stations for its onslaught. Nigerians detest the police. The force is “worse here than in any country I’ve worked in,” remarked a Western veteran of police training and security-sector reform in Africa. Human Rights Watch documented some of the abuses in a 2010 report. Shakedowns of street peddlers and passengers on public transportation are routine. So is arbitrary arrest and torture as a way to extort “bail” money.

But many Nigerians reserve their harshest words for civil servants. When oil money does reach state coffers, rivers of it get diverted through public procurement fraud. “Any job that attracts money,” a Defense Ministry IT worker explained, involves two contracts: the real one (“only two or three people know its terms”) and the formal document. Expenditures regularly total five or 10 times the actual cost of the project. “It’s so common now,” she said, “everyone is looking for an avenue to get something. At the end of the fiscal year, they create problems to get money. Everyone is bringing their memo.”

The dilapidated state of the ministry offices where we met — outdated computers, cheap plastic chairs, cracked desktops — spoke volumes about how corruption has hollowed out the Nigerian military, limiting its capacity to perform its core functions, including looking for the kidnapped girls.

To get one of the juicy civil service jobs, an aspirant needs a diploma. But the education system itself is corrupt. Students often have to shell out for their teachers’ transportation to examination sites. Meanwhile, membership in ruling networks guarantees success — and impunity.

In this context, many Nigerians see schooling less as a way to expand the mind or gain essential skills than as a way into a corrupt and abusive system. This education system — and its use to confer unfair advantage — is a holdover from British colonialism. Which helps explain Boko Haram’s moniker: It means “Western education is unclean.” As one Kano businessman put it: “It’s the system of going to school and getting a job in the civil service and skimming off contracts — that’s what they’re angry at. We all feel that way. If they had taken a secular approach, all Nigeria would be with them.”

U.S. military officials have chosen their words carefully when describing American counterterrorism assistance in Nigeria. They have talked about the difficulty of finding units the United States can legally work with, given widespread human rights abuses during “indiscriminate” crackdowns on Boko Haram. So far, the U.S. military has remained sober.

Yet, neither Secretary of State John Kerry nor President Obama has been so circumspect. “We are . . . going to do everything possible to counter the menace of Boko Haram,” Kerry proclaimed on May 8. Obama was equally intense two days earlier, describing Boko Haram as “one of the worst regional or local terrorist organizations. . . . They’ve been killing people ruthlessly for many years now, and we’ve already been seeking greater cooperation with the Nigerians.”

Not a word from either of them about the government abuses that have driven young Nigerians into the extremists’ arms. In this regard, the U.S. reaction seems reminiscent of the intervention in Afghanistan: persistent collusion with the corrupt government, and then confusion as to why the insurgency was expanding.

None of this is to say that the United States should not help find those kidnapped schoolgirls. But it should tailor the effort in ways that might help curb the underlying abuses that feed Boko Haram in the first place — or at least not actively enable them. Obama himself rightly said: “We cannot use force everywhere that a radical ideology takes root, and in the absence of a strategy that reduces the wellspring of extremism.”

Here are a few components of such a strategy, applied to Nigeria’s current crisis. First, U.S. officials should stop giving Jonathan a pass on corruption — not in spite of the threat of terrorism, but because of it. As Vice President Biden suggested to Ukrainian officials on a recent trip to Kiev, corruption and abuse of power often fuel extreme reactions.

Military assistance should remain fully compliant with the Leahy Amendment, which bans aid to foreign security forces that have “committed a gross violation of human rights.”

And with Nigeria now asking for help, Washington can attach some conditions. Future counterterrorism support should be contingent on security-sector reform or include a robust human rights and anti-corruption component. Development assistance contracts should not be used as a kind of “pay to play” ticket, delivered in exchange for meetings with Nigerian officials. All U.S. aid, including anti-poverty programs, should require payback in cases of financial irregularity.

Finally, U.S. and British justice officials should learn from the Ukraine experience and begin seizing the illegally acquired assets not just of dead dictators but of current Nigerian elites, who use Western banks and properties to salt away the cash they steal from their people.

It is by doggedly pursuing approaches like these — long after the jolt of horror at this attack has subsided — that the United States may help reduce the wellspring of extremism.

Read more from Outlook, friend us on Facebook, and follow us on Twitter.