After the horrific massacre at Charleston’s historic black church, Americans are slowly realizing the threat posed by white supremacist and neo-Nazi movements. But few know that their presence has grown within one of the most powerful institutions in America: the US military.

According to the FBI, there are hundreds of white supremacists in the US army or in the veteran community. Some analysts even estimate the number is in the thousands. In America, 203 white supremacist “extremist cases” investigated by the Bureau from 2001 to 2008 involved veterans. The problem hasn’t gone away. Neo-Nazi veteran Wade Michael Page attacked six worshippers at the Sikh Temple in Oak Creek, Wisconsin, in 2012.

I spent a number of years investigating how neo-Nazis and white supremacists had infiltrated the US military, with very little push back from the Pentagon, which was desperate to keep the supply of troops flowing for the occupations of Iraq and Afghanistan.

As part of my research, I spoke to veterans who had become white supremacists before service and joined to gain access to weapons and training, as well as veterans who had been radicalized after returning from the war.

Charles Wilson, spokesman for the National Socialist Movement, one of the top neo-Nazi groups in America, was frank about his attempts to populate the US armed forces with extremists: “We do encourage [our members] to sign up for the military. We can use the training to secure the resistance to our government. Every one of them takes a pact of secrecy ... Our military doesn’t agree with our political beliefs, they are not supposed to be in the military, but they’re there, in ever greater numbers.” He claimed to have 190 members serving.

Wilson’s claims can’t simply be dismissed as empty boasting. In a 2006 report, the National Gang Intelligence Center, which operates under the DOJ and integrates gang intelligence across agencies, noted: “various white supremacist groups have been documented on military installations both domestically and internationally.” Neo-Nazis “stretch across all branches of service, they are linking up across the branches once they’re inside, and they are hard-core,” Department of Defense gang detective Scott Barfield told the Southern Poverty Law Center.

The extent of the threat is evident if you speak to people like Dennis Mahon, a white supremacist who acts as a “lone wolf”. I spoke to him in 2008 on the phone. Four years later, he was sentenced to 40 years for a bomb attack that injured a black city official in Phoenix.

“I know two people in the military – one in Marines and one in the army. One has done two tours of Iraq,” he told me. “They are so desperate at the moment; they are going to let you in with a small swastika. If you are an obvious racist and shoot niggers and queers you might find it difficult, but generally you are fine,” he continued.

Mahon went on to tell me: “The soldiers learn from unconventional warfare in Iraq and they realize that they can use that type of warfare in America, and it’s impossible to stop. I tell people to learn as much as you can to improve munitions capabilities, patrolling; I want them to learn sniping and explosives, the Green Berets.”

A 2008 FBI report found: “Military experience – ranging from failure at basic training to success in special operations forces – is found through-out the white supremacist extremist movement.” Most of them were associated with the National Alliance and the National Socialist Movement, which promote anti-Semitism and the overthrow of the US government, and assorted skinhead groups.

Despite the risk these Army-trained extremists pose, there has been much opposition to acknowledging that the military has a problem, let alone doing something to fix it.

When the Department of Homeland Security warned in 2009 that disenchanted veterans wooed by white supremacist movements could lead to the “potential emergence of terrorist groups or lone wolf extremists capable of carrying out violent attacks”, the report was lambasted by right-wing politicians and commentators. Michelle Malkin called it “one of the most embarrassingly shoddy pieces of propaganda I’d ever read” and “anti-military bigotry”.

I know a number of analysts who researched radicalized US vets who went quiet after they were victims of similar smear campaigns. The senior analyst on homegrown terrorism who authored the report, Daryl Johnson, was put out to pasture by his employer. He now works as a consultant. Johnson has since warned of the “growing threat” from far-right radicals with military training. “My greatest fear is that domestic extremists ... will [carry] out a mass-casualty attack. That is what keeps me up at night,” he said.

If the US government wants to get serious about taking on white supremacist terrorism it must commit to kicking them out of the military. Like Dylann Roof, neo-Nazi veterans want a race war in the US. The government should make sure that extremists like him receive no training in the US armed forces that might help them carry out their fantasies.