A U.S. Army veteran planned to bomb a white nationalist rally in southern California in retaliation for the New Zealand mosque shootings that left 50 dead, federal authorities said Monday.

Mark Steven Domingo — a 26-year-old former U.S. infantryman who fought in Afghanistan — asked an undercover FBI agent for help creating a bomb powerful enough to kill 50 people. Domingo also allegedly talked about his support for “violent jihad, a desire to seek retribution for attacks against Muslims, and a willingness to become a martyr.”

“There must be retribution,” Domingo wrote after the attacks on two mosques in Christchurch, New Zealand, in March, according to a 30-page affidavit with the criminal complaint. The shooter, a 28-year-old Australian, was deeply enmeshed in white nationalist ideology.

When the undercover agent delivered multiple inert IEDs to him on Friday, law enforcement promptly arrested him and charged him with providing and attempting to provide material support to terrorists.

"This investigation successfully disrupted a very real threat posed by a trained combat soldier who repeatedly stated he wanted to cause the maximum number of casualties,” said U.S. Attorney Nick Hanna for the Central District of California in a statement.

During a meeting on April 3 with the undercover FBI agent, Domingo “expressed support for ISIS” and said “he would swear allegiance to ISIS” if the group came to the U.S., according to a statement from the Department of Justice.

He also allegedly considered targeting Jews, churches, and police officers but decided on April 19 that he wanted to attack the United Patriot National Front rally in Long Beach, California, on Sunday. The rally continued as planned, but counterprotesters vastly outnumbered the participants.

According to the affidavit, Domingo came to a meeting with the FBI agent that day “armed with an AK-47-style rifle” to show that he was serious. He also talked about the 2013 Boston Marathon bombing.

Domingo also expressed views online like “America needs another Vegas event,” in reference to the mass shooting in Las Vegas in October 2017 that left 58 people dead and scores injured. He wrote that would “give them a taste of the terror they gladly spread all over the world,” according to the affidavit.

"This is a case in which law enforcement was able to find a man consumed by hate and bent on mass murder, and stopped him before he could carry out his attack," Hanna said at a press conference Monday