By Lindsay Dunsmuir and Kevin Murphy

WASHINGTON/KANSAS CITY (Reuters) - A U.S. man was arrested on Friday as part of a sting operation by the FBI in which he was plotting a suicide car bombing at Fort Riley army base in Kansas in support of the Islamic State militant group, prosecutors said.

John T. Booker, Jr., 20, of Topeka, Kansas, had arrived at the base with two undercover FBI agents to detonate what he did not realize was an inert bomb, prosecutors said.

Booker has been charged with three criminal counts including attempting to use a weapon of mass destruction and attempting to provide material support to Islamic State, a militant group that has captured parts of Iraq and Syria over the past year and has symphathizers in several countries.

According to the criminal complaint, the Federal Bureau of Investigation had been tracking Booker since March of last year when he posted Facebook messages in which he said: "Getting ready to be killed in jihad is a HUGE adrenaline rush!! I am so nervous. NOT because I'm scared to die but I am eager to meet my lord."

If convicted, Booker faces up to life in prison. A lawyer for Booker could not be immediately identified for comment.

Booker had signed up for the U.S. army in Kansas the previous month and when interviewed by FBI agents after the Facebook postings admitted he had enlisted "with the intent to commit an insider attack against American soldiers" similar to the attack carried out in November 2009 by Major Nidal Hassan at Fort Hood, Texas, the complaint said.

He was denied entry into the army before his basic training began last April as a result.

Since October, he had unknowingly been in contact with an undercover FBI agent and in March of this year was introduced to another undercover agent who posed as a high-ranking Islamic sheik planning attacks on the United States.

Booker planned to carry out a suicide bombing because it would ensure he would hit his mark and never be captured, the complaint said.

On March 10, Booker, accompanied by the two undercover agents, made an Islamic State propaganda video near Marshall Army Airfield at Fort Riley, prosecutors said. He made an additional video two days ago in front of what was, unbeknownst to him, a stack of inert explosive materials.

(Additional reporting by Jon Herskovitz; Editing by Andre Grenon and Grant McCool)