Some of the starkest images from the recent violent unrest in Charlottesville were those of camouflage-clad men carrying semiautomatic rifles, wedged between white supremacists and counter-protesters.

They weren’t police or National Guardsmen. They were part of a patchwork of private militia groups from Pennsylvania, New York, Virginia and other states. The armed members say they were there to keep the peace and were not affiliated with any side — and their numbers at street protests are growing.

“We’re not racists,” said Christian Yingling, head of the Pennsylvania Light Foot Militia, who was commanding the militia members at the Charlottesville rally. “I was there to ensure that — even though I disagree with both sides — they have a right to say what they want.”

As tense protests between far-right and left-wing groups continue to spread throughout the U.S., private armed militias are increasingly stepping into the fray, sometimes as neutral peacekeepers — as in Charlottesville — other times firmly on the side of right-wing agitators.

Earlier this month, members of the This Is Texas Freedom Force militia showed up to protect a Confederate statue in San Antonio during a protest between those who want to tear it down and others who wished to maintain it.

In April, members of the Oath Keepers militia traveled to Berkeley, Calif., to protect alt-right activists from counter-protesters. “I don’t mind hitting” the counter-demonstrators, Stewart Rhodes, the group’s founder, told the Los Angeles Times. “In fact, I would kind of enjoy it.”

Militia participation in the U.S. is at an all-time high as hundreds of groups claim thousands of members across the country, said Mark Pitcavage of the Anti-Defamation League, which monitors extremists groups.

The groups began forming in the mid-1990s, spurred by stricter federal gun laws under President Clinton and the 1993 federal siege of the Branch Davidians compound in Waco, Texas, he said. President Obama's election in 2008 brought a surge of more militias, many of whom feared the federal government would seize their weapons, and the groups further multiplied with the advent of social media, Pitcavage said.

Militias tend to be heavily armed and highly suspicious of the federal government. Some on the fringes have planned large-scale attacks against government and other targets.

Last week, FBI agents arrested an Oklahoma man for plotting to detonate a car bomb at an Oklahoma City bank. The suspect, Jerry Drake Varnell, 23, of Sayre, Okla., professed he subscribed to the ideology of the Three Percenters, a militia movement named for the theory, debunked by historians, that the American Revolution was fought by just 3% of colonists.

Of the 372 people killed by domestic extremists the past decade, 74% of them were at the hands of right-wing extremists, which include militias, 24% were killed by domestic Islamic extremists and 2% by left-wing extremists, according to statistics compiled by Pitcavage. "The violence is not comparable," he said.

But the election of President Trump — whom many militia members backed — caused a conundrum among their ranks: They could no longer oppose a government led by the man they supported for president, Pitcavage said. So many militia members turned to a new enemy: the so-called “antifa,” a loose network of left-leaning activists who oppose — at times violently — white supremacists and right-wing groups. As the antifa movement (short for “anti-fascist”) shows up to the protests, so do the militias.

“They’re an ideological private army, not beholden to any authority,” Pitcavage said of the militias. “They’re extremely dangerous.”

Yingling, 45, said he got into militias about eight years ago. A Navy veteran, he was depressed and spiraling into a lifestyle of drinking and partying. Militias turned his life around, he said. “I needed that structure back, and the militia gave it to me,” said Yingling, a machinist by trade.

He was hesitiant at first to monitor the Charlottesville rally, he said, because he knew his group would be lumped in with the white nationalists organizing it. "I said, 'I’m not touching this with a 10-foot pole,'" Yingling said. "I want nothing to do with these people." But a friend and fellow miltiaman swayed him to go.

At the rally, he and the 32 other militia members got pelted with rocks, bricks, frozen water bottles and paint bombs as they kept the two sides at bay, he said. Still, they never fired their weapons or even raised them, he said.

More:Post-Charlottesville, Confederate monuments begin to fall across the U.S.

More:What is antifa and what does the movement want?

More:One week later, Charlottesville tries to move forward

Yingling said he always contacts local law enforcement before heading to a rally. But some law enforcement officials are wary of having them. Anyone can attend protests as long as they remain peaceful or help keep the peace, said Oakland County Sheriff Michael Bouchard, head of government affairs for the Major County Sheriffs of America, an association of elected sheriffs of counties or parishes with a population of 500,000 or more.

But the sheer sight of so many semi-assault weapons draped on the shoulders of militia members could escalate tensions, he said. "The policing of an event and keeping of the peace is a police function and should really be done by the police," Bouchard said.

When not monitoring protests, Yingling's militia helps out with disaster relief and volunteers at community events, he said. He said he and many of this cohorts supported Trump, but he tells his men not to bring their politics to rallies.

Trump’s election has emboldened many militia members, he said.

“A lot more people in this community are more willing to step out of the shadows,” Yingling said. “They feel like they’re not going to be arrested if they do.”

He added: “As big and scary as we look, all we want is for people to talk to each other. We don't want violence. We want people to act like educated adults.”