An army veteran who converted to Islam and discussed launching various terror attacks throughout Southern California was arrested as he plotted to bomb a white supremacist rally as retribution for the New Zealand mosque attacks, federal prosecutors said Monday.

Mark Domingo, an infantryman who served a combat stint in Afghanistan, was arrested Friday after visiting a park in Long Beach where investigators say he planned to plant homemade explosive devices made with nail-filled pressure cookers in advance of a Nazi rally scheduled Sunday.

Domingo, 26, was arrested on a charge of providing material support to terrorists. A criminal complaint said he had been planning since March to "manufacture and use a weapon of mass destruction in order to commit mass murder."

U.S. attorney Nick Hanna told a news conference that Domingo supported violent jihad and spoke about becoming a martyr and of pledging allegiance to ISIS if it established a presence in the United States.

"This is a case in which law enforcement was able to identify a man consumed with hate and bent on mass murder, and stop him before he could carry out his attack," Hanna said. "The criminal case outlines a chilling terrorism plot that developed over the past two months and targeted innocent Americans that he expected to gather this past weekend."

U.S. attorney Nick Hanna briefs the media as a suspect was arrested in connection with an alleged terror plot targeting multiple locations in Southern California on Monday in Los Angeles. (Frederic J. Brown/AFP/Getty Images)

Investigators said Domingo posted an online message March 3 that said "America needs another Vegas event," an apparent reference to the 2017 mass shooting that killed 59. He allegedly said it would spark civil unrest to weaken "America by giving them a taste of the terror they gladly spread all over the world."

After Domingo began to discuss seeking revenge for the March 15 attacks that killed 50 people at New Zealand mosques, a confidential source who has worked with the FBI since 2013 began chatting with him about his plans.

Domingo said he had an assault rifle and semi-automatic rifle and discussed possible jihad attacks targeting Jews walking to synagogue, churches, police officers or a military base, according to investigators.

When the source asked him how he planned to carry out violence without getting caught, court records said Domingo replied: "Martyrdom, bro."

Discussed more attacks

He also allegedly discussed killing a neighbour he was upset with as a prelude to broader violence and later contemplated bombing the Santa Monica Pier, where he said a summer attack on the crowded tourist spot would maximize casualties because people wouldn't be able to escape the blast in the enclosed space.

Eventually, he settled on the idea of planting an improvised explosive device that would be remotely triggered at a white supremacist event, investigators said. The confidential source connected him with a purported bomb maker who was actually an undercover police officer.

Tourists and locals swarm the Santa Monica Pier in Santa Monica, Calif., on April 21, which Domingo allegedly also thought about targeting. (Daniel Slim/AFP/Getty Images)

Domingo bought 3.6 kilograms of nails long enough to puncture internal organs and provided them to the bomb maker, though the resulting contraption contained only inert materials, authorities said.

If he survived the planned bombing at Bluff Park, Domingo allegedly discussed launching further attacks on the Long Beach Port or on a train.

The plot was thwarted just two days ahead of the event, investigators said, when an FBI SWAT team arrested Domingo after he was given the pressure cookers and surveyed Bluff Park in Long Beach, where the rally was supposed to happen.

White nationalists never showed up to the event on Sunday, but a large group of counter protesters demonstrated.

A message left on a phone listed for Domingo was not immediately returned.