LOS ANGELES — An Army veteran who converted to Islam and is accused of plotting terrorist attacks in California in retaliation for killings at New Zealand mosques was demoted and discharged from the military for a serious offense, a U.S. official told The Associated Press on Tuesday.

Mark Domingo violated the Uniform Code of Military Justice and was kicked out of the service before completing his enlistment contract, according to the official, who was not authorized to speak publicly about personnel issues and provided the information only on condition of anonymity.

Officials would not provide details on his offense.

Domingo, 26, was arrested Friday as he planned to plant bombs before a scheduled white supremacist rally in Long Beach, authorities say. He was charged with providing material support to terrorists and held without bail.

Domingo, a former combat infantryman, had recently become Muslim and discussed several plots over the past two months to kill scores of people in Southern California in revenge for last month's attacks on two New Zealand mosques that left 50 people dead, federal prosecutors said.

The terror plot was foiled by the FBI and police using an undercover officer and informant, who Domingo thought were his accomplices.

This undated California Department of Motor Vehicles photo released by the U.S. Department of Justice shows Mark Domingo. A terror plot by Domingo, 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, April 29, 2019. (U.S. Department of Justice via AP)
This undated California Department of Motor Vehicles photo released by the U.S. Department of Justice shows Mark Domingo. A terror plot by Domingo, 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, April 29, 2019. (U.S. Department of Justice via AP)

Military records show Domingo served about 16 months in the Army, including a four-month stint in Afghanistan in fall 2012. He left with a rank of private, the lowest possible grade.

An Army photo of Domingo in Afghanistan in November 2012 identified him as private first class, which is two steps above his discharge ranking.

Domingo was given a general discharge, which is an administrative action a step below an honorable discharge, the official said.

Associated Press investigative researcher Randy Herschaft in New York contributed to this report.