When a massive truck bomb destroyed a federal office building in downtown Oklahoma City on April 19, 1995—a seemingly senseless attack that killed 168 people and injured hundreds of others—the country’s federal law enforcement agencies were no better equipped to confront the threat of homegrown extremist violence than they are today.

In many respects, in fact, the situation was worse.

The radical far right was resurgent, fueled in part by widespread anger over growing economic inequalities, racial animus and a belief that pampered big-city liberals were coming for their guns and their way of life. The “angry white men” of the time were egged on—much like their present-day incarnations—by conservative talking heads who railed daily against “wetbacks” and “feminazis,” and by influential Republican politicians who ragged on their political adversaries as “the enemy of normal Americans.”

But in 1995 the feds themselves were, in a sense, enemy No. 1 on the right.

Wayne LaPierre of the National Rifle Association notoriously described the feds as “jack-booted government thugs… wearing Nazi bucket helmets and black storm trooper uniforms” after two botched law enforcement sieges, at Ruby Ridge, Idaho, and outside Waco, Texas, that left dozens dead. G. Gordon Liddy, the Watergate burglar turned right-wing radio host, encouraged listeners to aim their guns at the heads of ATF agents and “kill the sons of bitches.”

On top of that, the ATF and the FBI were flying almost blind when it came to detecting threats, even though a variety of radical figures had declared war on the federal government and the ATF was receiving reports of possible “assassinations, bombings and mass shootings.”

First, the two agencies were barely on speaking terms and refused to share what intelligence they had. And second, they were reluctant even to pursue domestic terrorism cases, because of the risk of touching a lot of political nerves and because federal agents didn’t necessarily see anything wrong with armed white guys with guns making threats if they hadn’t committed a specific crime. “There was a great reluctance among Bureau agents and the hierarchy to get involved,” a retired FBI domestic terrorism specialist, Horace Mewborn, told me in 2010. “We had to fight for everything we got.”

The ATF, for its part, was so afraid of being sucked into another potentially disastrous standoff with an armed militia that it shut down a vital informant operation in eastern Oklahoma in March 1995 instead of acting on what it was hearing. The ATF director at the time, John Magaw, later acknowledged to me that if the informant had stayed put, the Oklahoma City bomb plot probably would have been stopped. Instead, it was left to Oklahoma state police to pick up chatter of an impending attack, and while they sent a number of bomb disposal experts to Oklahoma City in the days leading up to April 19 they clearly did not know enough to stop disaster from striking.

In the first ghastly aftermath, as rescue workers dug through the wreckage for the dead and the dying, it was far from clear the perpetrators would be caught. Security was so lax at the Alfred P. Murrah building that its exterior video surveillance cameras, incredibly, had been left inactive for years. The feds showed no inclination to beat down the bushes of the radical far right, even though they had plentiful leads, because they didn’t want to advertise their own missteps and because they didn’t believe that exploring the broader political ramifications of the violence would go down well with a jury.

Instead, it was a few lucky breaks and an extraordinary deployment of manpower that led investigators to Timothy McVeigh and Terry Nichols within the first 48 hours. The expectation was that other co-conspirators would soon come to light, but the feds’ luck turned and within a few weeks the Justice Department was all but denying the existence of “others unknown” (as the federal indictment called them) and focusing the brunt of its attention on the two bombing suspects it already had in custody.

“ Remembering what happened is the only way that future leaders are going to learn. ” — Gary Noesner

Such was the inauspicious beginning of the federal response to an epidemic of far-right violence a generation ago. And yet things did not turn out as badly as they might have; within a few years, most of the criminals in or close to McVeigh’s orbit had been arrested. These included members of a neo-Nazi robbery gang who knocked over 22 banks across the Midwest in two and a half years; Chevie and Cheyne Kehoe, skinhead brothers whose crimes included the vicious murder of an Arkansas gun dealer and his family; and Eric Rudolph, a Nietzsche-spouting nail bomber who attacked abortion clinics and the 1996 Atlanta Olympics and disappeared completely for five years before crawling out of hiding in the North Carolina wilderness.

One can make the case that the far-right movement largely did itself in. The sheer excess of the Oklahoma City bombing, particularly the murder of babies and toddlers at the Murrah building’s daycare center, stopped all thought of a broad anti-government insurrection and silenced most of the incendiary rhetoric on the airwaves and on Capitol Hill. “The whole militia movement basically died that night,” one of McVeigh’s radical acquaintances later commented.

But the feds also played an important part. Yes, they continued to make startling mistakes–notably, arresting the wrong man for the Centennial Olympic Park bombing in Atlanta. But they also learned from their past blunders and, just as importantly, began to appreciate the gravity of the problem, devoting resources to undercover operations and monitoring of the gun-show circuit so they would not be caught by surprise again.

A turning point came in 1996, the year after Oklahoma City, when the FBI found itself laying siege to the Montana Freemen, yet another group of radicals who rejected the authority of the federal government and reacted to the arrest of their leader on bank fraud charges by holing up in their community in one of the remotest parts of the state.

This time, the feds did not roll in armored vehicles and threaten a military-style assault as they had at Waco. Instead, they chose to wait things out and rely on outside negotiators to help broker a surrender because the Freemen couldn’t respect anyone with a government badge. The Bureau ended up picking Kirk Lyons, a colorful lawyer known for his representation of right-wing radicals and his fondness for Civil War reenactments, and Dave Hollaway, Lyons’ even more colorful sidekick who cheerfully likened the feds to Nazis and “cement heads.”

And it worked. Gary Noesner, an FBI hostage negotiator who worked with Lyons and Hollaway and directed their efforts from behind the scenes, said the pair were “extraordinarily helpful”—not only in ending the standoff but in resurrecting the FBI’s tattered reputation.

From then on the FBI made sure to infiltrate every known extremist group, relying in part on the willingness of adherents to offer information either for money or to save their own skins, and in some cases on the radicals’ propensity to sabotage themselves. The Kehoes, for example, were arrested after getting into a spectacular and wholly needless close-range gunfight with an Ohio traffic cop in which nobody, remarkably, was hurt.

By the time Rudolph was arrested in 2003, “angry white men” had largely disappeared as a political label. But of course the anger never went away. The agents who worked hardest on the Oklahoma City bombing case and the many that followed started to age out, and meanwhile the government became so consumed with the threat from radical Islamists in the wake of 9/11 that domestic extremism slipped once again down the FBI’s priority list even though right-wing radicals were responsible for just as many deaths on American soil as jihadists.

Now the anger is once again palpable, even as the threat has grown more troublesome and more diffuse because individuals are becoming radicalized through the internet and acting on impulses they may not be sharing with others. That does not mean, however, that the feds can afford to forget the past–or downgrade either the funding or the operational importance of combatting the problem. Law enforcement agencies are still riven by turf wars and suffer intelligence failures. Culturally, the feds still tend to underestimate the right-wing threat, and the Trump administration has only exacerbated that. “Remembering what happened,” Gary Noesner told me, “is the only way that future leaders are going to learn.”

Andrew Gumbel is an award-winning investigative reporter and author who writes regularly for The Guardian, among other publications. His books include Oklahoma City: What The Investigation Missed and Why It Still Matters (William Morrow, 2012).