The Nigerian terrorist group Boko Haram launched its worst attack ever in the northeastern town of Baga, where it killed hundreds or possibly more.

The motivation is unclear, but it appears aimed at intimidating Nigerians into not voting in the coming presidential election.

Key context is the military's indifference to northern Nigerian lives. Its troops fled almost immediately, and had itself previously massacred Baga's residents.

What we know about the attack

No one knows for sure how many people the Nigerian terrorist group Boko Haram slaughtered during its six-day rampage in the northeastern town of Baga. A lone and speculative early report said 2,000 dead, though subsequent counts suggest "dozens" or "hundreds." But there is little question this is a massacre of breathtaking and possibly unprecedented severity, even for Boko Haram. If you zoom out, though, you can see that a crucial part of this story is the Nigerian military's repeated and demonstrated indifference to the lives of northern Nigerians.

Here is what appears to have happened: On Saturday, January 3, Boko Haram fighters in pickup trucks drove up to a military outpost in Baga. The Nigerian troops immediately began fleeing; Boko Haram captured the outpost by noon. In the next few days, the group raided surrounding villages, killing civilians. On Wednesday, it overran Baga itself, beginning a days-long process of methodically razing buildings and killing everyone the group saw.

"When they neutralized the soldiers, they proceeded to Baga and started killing everyone on sight," a witness told the New York Times. "There was no pity in their eyes. Even old men and children were killed."

Here is what we know about why they did it: It is still not totally clear why Boko Haram so viciously attacked Baga. But the closest thing to evidence of a motive came on Friday. As Boko Haram slaughtered Baga's residents, its fighters visited several nearby villages. They shot villagers, apparently at random, and commanded the survivors not to vote, the Wall Street Journal reports.

Boko Haram condemns democracy itself as religiously forbidden; on Thursday, its leader had released a video ranting against democracy in all its forms, and it has long stated that voting is a crime. Nigeria is in the middle of a presidential campaign and is gearing up for a presidential election on February 14.

The country is roughly split between Muslims and Christians; ironically, Boko Haram's anti-democracy attacks could swing the election in favor of incumbent President Goodluck Jonathan, a Christian, by suppressing turnout among mostly Muslim northern Nigerians who would likely vote against him.

The bigger picture: the Nigerian military's failure

Like the larger story of Boko Haram itself, the story of the Baga massacre is a story of Boko Haram's depravity but also of the Nigerian military's abject failure.

It is not just that the Nigerian troops stationed in Baga fled almost immediately on Boko Haram's arrival. The military has itself played a role in Baga's terror. In April 2013, a handful of Boko Haram fighters ambushed some Nigerian troops near Baga. In response, the military stormed Baga, burning down thousands of homes and killing 200 people.

This is wholly consistent with the Nigerian military's conduct in its so-called fight against Boko Haram in northern Nigeria, where the group operates.

The heavy-handed military — which, recall, ruled as dictators not so long ago — has been accused time and again of atrocities in its campaign against Boko Haram. They are typically accused of targeting civilians, but sometimes, they kill out of what appears to be simple incompetence. In March 2014, for example, some very brave northern Nigerians alerted the military that Boko Haram was operating near their village. The military did nothing for several days, then bombed the village, killing the very people who'd tried to help, by which time Boko Haram had left.

None of this created Boko Haram, but it helps provide an environment where the group is able to operate more widely and freely than it otherwise could. The military's utter failures, and at times active efforts to commit atrocities, are a crucial component of the Boko Haram story, nationally and in Baga.