A US military veteran who recently converted to Islam was busted for a domestic terror plot in Southern California that he said was revenge for the New Zealand mosque attacks, officials announced Monday.

Mark Steven Domingo, 26, was arrested Friday night after he received what he believed was a live pressure cooker bomb as part of an FBI sting operation. The former US Army infantryman who served in Afghanistan planned to set off the IED “in order to commit mass murder” at a planned white nationalist rally in Long Beach, federal officials said.

Officials said they identified Domingo in a hate-filled online chatroom two days before the New Zealand attacks.

Domingo is “a man consumed with hate and bent on mass murder,” US Attorney for the Central District of California Nick Hanna said at a Monday press conference.

Domingo said he wanted to kill Jews as they walked to synagogue, according to Hanna. He also thought about targeting police officers, military personnel and people walking on the Santa Monica Pier.

“America needs another Vegas event,” Domingo said in an online video professing his Muslim faith, an affidavit unsealed Monday states. He was referring to the October 2017 mass shooting in Las Vegas.

Another attack would give “them a taste of the terror they gladly spread all over the world,” Domingo said, according to the April 27 complaint.

After the New Zealand attacks, he said there needed to be “retribution,” the complaint states. He also expressed a desire to become a martyr and said that if ISIS ever built operations in the US, he would gladly join them.

The trained soldier, who served abroad for four months in 2012, enlisted the help of a person he believed shared his vile views to build a bomb, the affidavit and officials said.

“Domingo said he specifically bought three-inch nails because they would be long enough to penetrate the human body and puncture internal organs,” the affidavit states.

That person turned out to be an FBI agent who arrested Domingo after they scoured the rally’s location for where to plant the device.

Federal officials said Domingo had recently converted to Islam and experienced a “rapid radicalization to violence.”

Domingo had a “perverted view of the world and a twisted interpretation of religion,” Ryan Young, the FBI special agent in charge of counterterrorism in Los Angeles, told reporters.

“This is a case that keeps us up at night,” Young said.