The end is nigh — or at least, it looks like it.

This is the third year in a row that swarms of locusts have descended on Madagascar, the island nation off the coast of Southeast Africa. Much like in biblical epics, these pests have devastated crops and turned farmlands into post-apocalyptic wastelands. Here is a primer on what's going on:

(Warning: Graphic pictures of insects.)

1. There are billions of locusts in these swarms — and they are hungry.

Getty Images

Each locust is able to consume its own body weight in food — around 2 grams — in one day. And it's breeding season, which means the insects are eating more and multiplying.

2. And the swarms are huge.

Getty Images

"A single swarm may be an estimated 460 square miles in size, and there can be some 80 million locusts packed into less than a half-mile square," reports NPR.

3. The locusts pose a serious economic problem.

Getty Images

According to the U.N. Food and Agriculture Organization (FAO), the locust plague threatens the livelihoods of 13 million people in Madagascar, about 60% of the mostly agricultural population. Food crops such as rice and maize are especially at risk.

"Locust infestations, if untreated, could wipe out food crops and livestock grazing lands – and with it a family's ability to provide for itself," the FAO said.

4. There has been an international response, with limited success.

Getty Images

Last year, the FAO and Madagascar's government enacted a three-year emergency plan to deal with the plague and ended up spraying pesticides on nearly 2.5 million acres of farmland. That didn't prevent the swarm from returning this year.

5. But it's still the best option on the table.

Getty Images

The pesticide operations will continue until 2016 and are expected to cost more than $41 million, although raising the funds has been an issue.

6. Climate change is at work here.

Getty Images

As Princeton biologist Iain Couzin explained to NPR, extreme weather patterns have a hand in creating these swarms. "We still don't really know all the factors involved in making them swarm, but certainly weather conditions and a changing climate have an effect. In 2013, massive flooding from a cyclone created a perfect breeding environment for the insects, for example," he said.

7. There are sociopolitical factors, as well.

Getty Images

"The reason the swarms are so bad elsewhere is because they are compounded by other issues — civil war, famine, political unrest. In parts of Africa in particular, the political situation is very dynamic," Couzin said. "Even relatively stable countries, like Morocco and Mauritania, struggle because they don't see eye to eye and don't help each other as much as they could."

8. Locusts will eat each other, but you shouldn't try eating them.

Getty Images

As the swarms get packed tighter and tighter, locusts start cannibalizing each other. They also sequester toxins from the wild plants that they eat, which means that they are not safe for human consumption — so eating the locusts is not a viable strategy to deal with this plague.

9. The swarms have moved to the cities as well.

Getty Images

While locusts usually swarm over farmland in search of food, they have now moved into cities such as Antananarivo, the capital of Madagascar. The infestation began about a week ago, and thus far thousands of dead locusts have rained on the city.

If you don't mind having nightmares tonight, watch the locusts in action below:

Sleep tight, everyone.