A terror plot by an army veteran who converted to Islam and planned to bomb a white supremacist rally in southern California as retribution for the New Zealand mosque attacks was thwarted, federal prosecutors said Monday.

Mark Domingo, 26, an infantryman who served a combat stint in Afghanistan, was arrested by federal agents Friday while finalizing plans to plant a bomb at a Nazi rally that had been scheduled Sunday in Long Beach.

Domingo was arrested on a charge of providing material support to terrorists and 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”.

Court papers show that Domingo discussed with an informant different types of attacks that included targeting Jews, churches and police officers.

Domingo allegedly said he wanted revenge for attacks on mosques in New Zealand that killed 50 people last month.

Domingo allegedly bought parts, including nails, for an improvised explosive device that would be remotely triggered, but in fact contained inert materials, the FBI agent Tasha Coolidge said in an affidavit filed in US district court in Los Angeles.

If they survived the planned bombing at Bluff Park, Domingo discussed launching further attacks on the ports of Long Beach and Los Angeles or on a train.

White nationalists never showed up to the planned event in Bluff Park, but a large group of counter-protesters demonstrated.

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