As protests gripped Oakland on May 29, a white van pulled up outside a federal courthouse. A door slid open, and a man peppered the two security officers outside with bullets, killing one and wounding the other.

For a little over a week, the crime was a mystery. Was it tied to the protests just blocks away? Even after the suspected killer was dramatically caught in the nearby mountains eight days later, his motive was murky.

Now, federal authorities say the man, identified as Air Force Staff Sgt. Steven Carrillo, 32, was an adherent of the “boogaloo boys,” a growing online extremist movement that has sought to use peaceful protests against police brutality to spread fringe views and ignite a race war. Federal investigators allege that’s exactly what Carrillo was trying to do last month.

Federal prosecutors on Tuesday charged Carrillo with murder and attempted murder, and leveled aiding and abetting charges against Robert Alvin Justus Jr., who has admitted to serving as a getaway driver during the courthouse ambush, according to the FBI. Protective Security Officer David Patrick Underwood was killed and a second officer, whom officials have not named, was critically wounded in the ambush. Inside the three vehicles Carrillo used, police found a boogaloo patch, ammunition, firearms, bombmaking equipment and three messages scrawled in blood: “I became unreasonable,” “Boog” and “Stop the duopoly.”

“The assassination and injury of federal officers who swore an oath to protect the American public will not be tolerated,” Chad Wolf, the acting secretary for homeland security, said in a statement announcing the charges. “The Department of Homeland Security will continue its mission to end violent extremism in any form.”

Carrillo’s attorney, Jeffrey Stotter, told NBC News investigators’ claims are “accusations and allegations,” and said his client was “left deeply shaken” by his wife’s suicide in 2018. He also told the Santa Cruz Sentinel that Carrillo, who was an active-duty Air Force staff sergeant at the time of the attack, suffered a traumatic brain injury in 2009.

“All I can ask is that we avoid a rush to judgment as to what occurred,” Stotter told the Sentinel.

The newly detailed alleged motive behind the attack at the Oakland courthouse comes as concerns rise about right-wing violence at Black Lives Matter protests. On Monday, a counterdemonstrator shot a protester during a scuffle in Albuquerque, after a militia group in military-style garb and armed with semiautomatic rifles stood menacingly in the crowd throughout the afternoon. Other boogaloo boys have been charged recently with fomenting violence at other protests.

The alleged crime rampage started with a Facebook exchange between Carrillo and Justus on the morning of May 28, according to the criminal complaint.

Carrillo was transferred to Travis Air Force Base about a month after his wife’s 2018 death and had no disciplinary record in the Air Force. He was a Phoenix Raven team leader, heading an elite squad of security forces stationed at Travis Air Force Base. He served four months overseas in Kuwait in 2019.

“It’s on our coast now, this needs to be nationwide,” Carrillo allegedly posted in a group chat with Justus and one other person, referring to a YouTube video showing a crowd of protesters attacking two California Highway Patrol vehicles. “It’s a great opportunity to target the specialty soup bois. Keep that energy going.”

“Let’s boogie,” Justus allegedly replied.

The term “soup bois” has been used in boogaloo memes to refer to the “alphabet soup” of federal law enforcement agencies such as the FBI; the Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF), and the Federal Protective Service (FPS). Facebook messages also show Justus and Carrillo planned to use nearby protests as a distraction, knowing police resources would be focused on preventing rioting and looting, the criminal complaint alleges.

The next day, on May 29, as thousands of protesters filled the streets in Oakland, Justus allegedly drove the 1992 white Ford van to the federal courthouse in Oakland and rolled past two Protective Security officers standing guard as Carrillo opened the van’s sliding door and fired multiple rounds, authorities say.

The men fled in the van and disappeared for days while police circulated photos of the vehicle, pleading with the public for information that would lead them to the gunman.

Eight days later, on June 6, a witness in Ben Lomond, Calif., about 70 miles south of Oakland, spotted the 1992 van, its license plates removed, windows obscured with spray paint and a distinctive missing hubcap replaced with a new one that did not match the other three wheels. Inside the car, investigators found Carrillo’s fingerprint on a can of white spray paint, according to the complaint.

The van’s VIN number led officers that afternoon to Carrillo’s property in Ben Lomond.

As they approached the isolated home surrounded by wooded hills, someone began firing. Two sheriff’s deputies were shot in the gunfight, and one later died. Then, an explosion erupted nearby.

The shooter, allegedly Carrillo again, ran away, armed with a semiautomatic rifle equipped with a silencer and designed to fire multiple rounds with each pull of the trigger. He allegedly stole a Toyota Camry from a driver at gunpoint. He abandoned the car nearby after scrawling the boogaloo-linked phrases on the hood in his own blood, authorities say.

Wounded from the gunfight, Carrillo did not make it much farther. He allegedly stumbled onto a local resident’s property, still bleeding, with his rifle strapped to his chest, and demanded the homeowner’s car keys. The man calmly went inside to retrieve the key and handed it to Carrillo, law enforcement officials said. When Carrillo turned to leave, the man tackled him, disarmed him and held him until police arrived and arrested him.

Federal officials took particular issue with Carrillo’s alleged intent to use protests in Oakland as cover for the ambush attack.

“Indiscriminate targeting of law enforcement officers by those motivated by violent extremism of any stripe is contrary to our nation’s values and undermines the powerful message of peaceful protesters,” Assistant Attorney General for National Security John C. Demers said in a statement Tuesday. “We stand firmly against anyone who seeks to hijack the protests with acts of violence and destruction.”

The so-called boogaloo boys movement might be more accurately described as a loosely connected online community, with no formal organization, leadership or coherent set of beliefs. Almost everything about the far-right ideology — starting with the name, spawned from online jokes about a 1982 break-dancing film — bubbled up through meme-sharing on social media platforms such as Facebook and YouTube and more obscure sites such as 4chan and Gab.

The igloos and Hawaiian shirts that boogaloo supporters sport in public are drawn from memes riffing on the name, which sounds similar to “big igloo” and “big luau,” and refers to a civil war that “boogaloo bois,” as they are also known, imagine in the near future. One uniting theme behind the movement is a belief in and support for that civil war against a tyrannical government. Beyond that, the boogaloo ideology is flexible.

Many of those who claim an allegiance to the far-right movement, which is made up largely of young white men, frequently carry rifles and espouse a need to defend the Second Amendment. According to the Anti-Defamation League, some boogaloo adherents oppose government overreach and advance libertarian ideas embraced by militias and gun-rights groups; others openly spread white supremacist rhetoric and encourage a race war.

In April and May, boogaloo boys showed up to anti-lockdown protests. One alleged supporter was arrested as part of an armed group that aimed to defend an illegally opened bar in Texas from law enforcement attempting to enforce the governor’s coronavirus restrictions.

More recently, they’ve been spotted at Black Lives Matter events. Sen. Marco Rubio (R-Fla.) tweeted a photo of two men in Hawaiian shirts posing near a flipped police cruiser in Salt Lake City on May 31. And on June 3, federal prosecutors charged three men allegedly connected to the boogaloo movement with exploiting a racial justice protest in an attempt to incite violence using a molotov cocktail.

In addition to the federal charges, Carrillo faces a murder charge in the slaying of Santa Cruz County Sheriff’s Sgt. Damon Gutzwiller, and attempted murder charges for allegedly shooting at deputies when they searched his California property June 6.

If convicted on the federal counts, Carrillo could face the death penalty for the murder charge and up to 20 years in prison for the attempted murder charge. Justus could face the same penalties for the aiding and abetting charges.