When people in Segovia, Colombia, a dusty gold-mining center 125 miles northeast of Medellín as the crow flies and six hours away by road, talked about what was happening there, they said the explosion of violence in the town had started with the massacre. Four members and associates of a family had been ambushed at a meeting to decide the fate of a successful local mine, called La Roca. Behind the killings, they said, was a prominent local figure. He was rarely spoken of in anything much louder than a whisper. He was known simply as Jairo Hugo.

To understand Jairo Hugo Escobar Cataño — his rarely used full name — you have to understand the gold. Colombia’s gold reserves were a formidable prize for Spanish colonists, who eventually imported African slaves to work the colony’s rich veins. It has always been a profitable industry, but perhaps never so much as when global gold prices began to rise steadily in the last decade. Between 2000 and 2007, the average price of gold more than doubled, from $279 to $695 an ounce. By 2011, it had more than doubled again, to $1,572 an ounce. A gold rush swept through swaths of Colombia, and narco-trafficking groups — both guerrillas and paramilitary organizations — turned to the precious metal to make up for lost profits in the drug trade. In many parts of the country, gold became the new cocaine.

Much of the country’s production is still the work of traditional miners — often prospecting without official permission on the margins of big companies’ legal claims. The rest comes mostly from the larger wildcatting outfits that popped up across the country as the market exploded, dynamiting hillsides, dredging up entire riverbeds, and tearing through pristine landscapes with backhoes, leaving moonscapes in their wake. These operations are often intertwined — voluntarily or otherwise — with Colombia’s criminal underworld. Many mines pay an extortion tax to whichever armed group is in charge of the region. Sometimes outlaws act as shareholders in a mine. The result: A portion of gold sales goes directly into the coffers of militias.

In few parts of the country was this as obvious as the region where Hugo had risen to unofficial power. Hugo had worked for a time as a miner, then served for five years as an auxiliary policeman in a settlement near Segovia. In the 1990s, he made his first foray into the business of gold trading — buying gold directly from mines, then refining and melting it down into bars to sell to big exporters in Medellín.

Hugo was a wise businessman, and soon he branched out on his own, starting two gold-buying shops. Then, in 2008, he persuaded a large mining concern to lease him one of the company’s abandoned properties. His mine, La Empalizada, quickly became one of the most profitable in Segovia’s history. He also seems to have developed links at this time to the powerful Rastrojos, a drug-trafficking and paramilitary organization spun out of one of the country’s most powerful cartels.

I was told that in his hardscrabble hometown of Remedios, about 30 minutes from Segovia, “they saw him as a king, as a god.”

The owners of La Roca, the mine that sparked the massacre, were a family called the Serafines, and they were emblematic of the class of smallholding miners who had been excavating the Colombian countryside for generations. For 18 months the Serafines dug, blasted, and hauled rock on an illegal claim until finally, in the spring of 2011, they struck an incredibly rich vein. When I visited, La Roca was producing about $700,000 worth of gold a month, making it one of the richest independent mines in Segovia. The Serafines went from poor church mice to gods overnight.

Shortly after the Serafines struck gold, two armed men showed up at a family member’s house. The men, as the family later told the story, were members of the Rastrojos. Not only did they demand an extortion tax — they claimed that Hugo wanted the mine. Later, at a riverside meeting, the Rastrojos told them that Hugo was offering the armed group $60,000 to forcibly take over the mine on his behalf. “No one leaves until we settle this,” the Rastrojos’ head commander said.

But the Serafines refused to budge, and the following December two family members and three of their associates were brought to a meeting outside Segovia, in a place called Altos de Muertos — the Heights of the Dead. Four of them were shot almost immediately. A police investigator at the scene described them to his colleague as re-muerto, or very, very dead.

About a month beforehand, the Rastrojos’ national commanders had made a deal with a group called the Urabeños — the only other criminal organization of national scope. They were a group of ex-paramilitaries that had expanded beyond their base, and in doing so they had come into conflict with the Rastrojos over drug-trafficking routes and territory. Growing weary of bloodshed, the two groups decided to negotiate a truce. The agreement handed the Urabeños control of the northeastern gold-mining region in exchange for a reported 6 billion pesos, or $3.3 million.

After the massacre, local Rastrojo dissenters, distrustful of the deal and wary of the Urabeños’ intentions, broke away to form a new militia. The dissident Rastrojos levied a new tax on the region’s inhabitants and mines and used the proceeds to buy machine guns, mortars, and grenade launchers through their contacts in the Colombian army. Soon their ranks swelled to almost 200 fighters. A war erupted between the Urabeños and the dissident Rastrojos.

As they fought for control of the northeast, civilians were caught in the middle. The militant groups both demanded absolute loyalty, and assistance, from the people who lived in their territories. Anyone could be accused of being an informant — a store owner, a lottery vendor, a cab driver, a miner — and anyone could be a victim.

The surviving Serafines remained a major, if not the major, target of the dissident Rastrojos, whom the Serafines accused of serving Hugo’s wicked desires. After the murder of their family members, the Serafines realized they had two options. They could lose a lot of blood and money in outright conflict. Or they could employ a cold-war strategy — weakening their enemies not with bullets but with the strategic exchange of intelligence, letting the police and military fight the war for them. The Serafines opted for the latter, though they still hired a protective army of 30-plus armed men.

In the attorney general’s office in Medellín, the task of dismantling the mutating monster of the dissident Rastrojos in the northeast had fallen to a state prosecutor. Among the many ongoing investigations that landed on his desk was the case that police investigators had been building against Hugo. Finally, on November 11, 2012, an arrest warrant for Hugo was quietly slipped in amid those for 17 dissident Rastrojos. Regional police apprehended him shortly thereafter.

When I returned to Segovia less than three months later, in February 2013, I found the town in an unofficial state of emergency. The war had raged on without Hugo. By the end of 2012, Segovia’s gold production had nearly doubled, and its murder rate had quadrupled. Remedios and Segovia now had the highest and second-highest homicide rates, respectively, in the country.

The fighting seemed like it would never end — and then, one day, it did. At the beginning of May 2013, copies of a communiqué fluttered down onto Segovia’s streets, announcing “the end of the war” in the northeast. “We sat down at the table with only one intent,” it read: “to stop the barbarity of blood. Today, thanks to GOD, we are breathing Peace.” The Urabeños and the dissident Rastrojos, the leaflet explained, had decided that they were better off joining forces than fighting each other. The newly unified outlaws invited “everyone who fled their land to return.”

Several dissident Rastrojos said Hugo was convinced that the Serafines were behind an earlier attempt on Hugo’s life, and that that was his motive for ordering their deaths. Some pointed to his desire for La Roca. Other dissident Rastrojos told prosecutors that shortly after recovering from an assassination attempt, Hugo had met with several of the group’s commanders and negotiated a price of $400,000 to kill the Serafines.

Meanwhile, the Serafines had their own secrets. Months after the Urabeños had taken control of the region and the gold mines, three jailed dissident Rastrojos told me the Serafines had been financing their enemy, the Urabeños, during much of the war. It was a claim the head of the Serafines’ security team eventually confirmed to me, after telling me that he and his colleagues had also provided the Urabeños with information — photos, names, and other forms of intelligence — to help squash their rival. “I put the information about the bandidos on a plate, and they killed each other,” the security chief explained to me on a visit to the mine one sleepy summer day.

I thought back to a conversation I had had with a state prosecutor in June 2012, when his office was in the midst of its campaign to crush the dissident Rastrojos. “They sometimes say that we are useful idiots,” he told me, a note of sadness in his voice. He knew as well as anyone that in Colombia crime abhors a vacuum. “In a way, you could almost say we are giving this territory to the Urabeños,” he said.

Perhaps the Serafines were no better than Hugo, backing a bloodthirsty militia to serve their own ends. Or maybe it was naive to think that anyone in Segovia had the luxury of not choosing sides. Trying to stay above a conflict when power shifted as capriciously and violently as it did in Segovia was an impossible business. As one Rastrojo commander told me, there was only one law that held in the town — “the bigger fish eats the smaller fish.”

For the full story behind Segovias gold war, check out The Devil Underground at Atavist.com, reported in partnership with The Investigative Fund at The Nation Institute, now known as Type Investigations.