(Adds details from FBI officials, criminal complaint)

By Dan Whitcomb and Steve Gorman

LOS ANGELES, April 29 (Reuters) - A U.S. combat veteran of the war in Afghanistan who prosecutors say plotted to detonate multiple nail bombs at a Los Angeles-area white nationalist rally, seeking to cause mass casualties, was arrested in an FBI sting operation, federal prosecutors said on Monday.

Mark Steven Domingo, 26, a U.S. Army infantryman who recently converted to Islam, was taken into custody on Friday after undercover FBI operatives furnished him with what he thought were live bombs to be used in the attack, law enforcement officials said.

Authorities said Domingo, who had no prior criminal record, came to their attention because of a series of violent extremist messages he posted in online chat rooms, one of which called for "retribution" for the massacre of 50 people at mosques in Christchurch, New Zealand, by a gunman in March.

"Often we are asked what keeps us up at night. This is a case that keeps us up at night," Ryan Young, special agent in charge of the FBI's Joint Terrorism Task Force, told a news conference in Los Angeles.

Domingo, who had purchased several hundred long nails to serve as shrapnel in the homemade pressure-cooker bombs, had also suggested attacks on Jews, police officers, churches, a military facility, Southern California freeways and the Santa Monica Pier during internet conversations with the FBI operatives, Young said.

He was charged in a federal criminal complaint with providing material support to terrorists and was ordered held without bond during a brief initial appearance in U.S. District Court in Los Angeles on Monday.

"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," U.S. Attorney Nick Hanna said in a statement.

According to the criminal complaint, an FBI operative established contact with Domingo in a private online chat room in March, leading to discussions in which Domingo expressed support for Islamic militants and the desire to seek revenge for attacks on Muslims.

'VIOLENT JIHAD'

In one of his earliest posts, he suggested that "America needs another Vegas event," an apparent reference to the 2017 mass shooting at a country music concert in Las Vegas where a lone gunman perched in a nearby hotel killed 58 people and wounded hundreds, the complaint alleged.

Domingo, who said he wanted to become a martyr, also made reference to the 2013 Boston Marathon bombing, according to the complaint. During one meeting in person with an FBI operative, he arrived carrying an AK 47-style assault rifle, telling the informant: "I just wanted to show you that I'm serious."

According to a law enforcement database, Domingo is the registered owner of three semi-automatic rifles. An FBI spokeswoman said received a less-than-honorable discharge from the Army.

Prosecutors say Domingo contemplated drive-by shootings and detonating a bomb at the Santa Monica pier before deciding to bomb a rally scheduled for Sunday, April 28, in the Los Angeles suburb of Long Beach that he believed was organized by white nationalists.

Domingo and two FBI informants visited the planned site of the rally to scout the best location to place explosives to cause the greatest casualties, authorities said, agreeing that they would leave the scene separately to throw off suspicion. He as arrested shortly after placing one of the mock bombs into the vehicle of an informant.

The white nationalist rally ended up not happening, although a number of counterdemonstrators assembled at the site, the Los Angeles City News Service said.

The announcement of Domingo's arrest came two days after a gunman opened fire in a San Diego-area synagogue, killing one woman and wounding three others, including the rabbi. John Earnest, 19, was arrested.

There was no indication the two incidents were connected. (Reporting by Dan Whitcomb and Steve Gorman; editing by Tom Brown, Lisa Shumaker and Sonya Hepinstall)

Our Standards: The Thomson Reuters Trust Principles.