(CNN) A former U.S. Army enlistee who vowed to "bring the Islamic State straight to your doorstep" pleaded guilty Wednesday to attempting to detonate a car bomb at Fort Riley military base in Kansas, authorities said.

"John Booker admitted that he intended to kill U.S. military personnel on American soil in the name of ISIL," John Carlin, assistant attorney general for national security, said in a statement, referring to the terror organization also known as ISIS.

"Thankfully, law enforcement was able to safely identify and disrupt this threat to the brave men and women who risk their lives to defend our country."

Booker admitted in court that his plot involved the construction of a bomb containing 1,000 pounds of ammonium nitrate, according to federal prosecutors. He intended to trigger the bomb himself and filmed a video that was to be shown to Americans after his death in the suicide bombing.

"You sit in your homes and think this war is just over in Iraq," Booker said in the video, according to prosecutors. "Today we will bring the Islamic State straight to your doorstep."

His attorney, Kirk Redmond, did not return a call seeking comment.

Bomb was a dud from the start

Booker did not know the bomb he constructed was made with inert materials or that two men working with him were FBI informants, prosecutors said.

The investigation of Booker was launched in March 2014 after he posted on Facebook of his intentions to engage in violent jihad, prosecutors said.

Booker enlisted in the Army in 2014 and was scheduled to begin basic training in April of that year, Army spokesman Wayne Hall said at the time of Booker's arrest.

The criminal complaint said the FBI questioned him in March 2014 about comments posted on Facebook, such as, "Getting ready to be killed in jihad is a HUGE adrenaline rush. I am so nervous. NOT because I'm scare to die but I am eager to meet my lord."

In a video, Booker pledged allegiance to Abu Bakr al-Baghdadi, the leader of ISIS.

Booker told investigators that he enlisted to commit an insider attack against American soldiers like the one Maj. Nidal Hassan carried out at Fort Hood, Texas, according to prosecutors. Hassan opened fire in a building in November 2009, killing 13 people and wounding more than 30.

His enlistment was terminated March 24, 2014, at the request of Army Criminal Investigation Command, Hall said.