A soldier based in Hawaii pleaded guilty Wednesday to trying to help the Islamic State group — admitting he provided secret military information, a drone meant to track U.S. troops and other support to undercover agents he believed were members of the terrorist organization.

Sgt. 1st Class Ikaika Kang, handcuffed and wearing beige prison jumpsuit, spoke in a clear and confident voice when he told a U.S. magistrate judge in Honolulu he’s guilty of all four counts charged in an indictment filed last year.

“Your honor I provided unclassified, classified documents to the Islamic State,” Kang said, adding that he also provided the drone.

He agreed when Assistant U.S. Attorney Ken Sorenson described other support he provided to undercover agents Kang believed were part of the Islamic State group, also known as ISIS.

Kang provided voluminous, digital documents that included sensitive information including a U.S. military weapons file and various military manuals, Sorenson said.

Trained as an air traffic controller, Kang also provided documents including call signs, mission procedures and radio frequencies, “all of which would have been helpful to ISIS,” Sorenson said.

At one of the meetings with agents Kang believed were part of the Islamic State, he swore allegiance to the group in Arabic and English and kissed an Islamic State flag, Sorenson said.

Kang was obsessed with videos depicting terrorism beheadings, suicide bombings and other violence, and he watched them in his bedroom for hours daily, a confidential informant told agents. The agents put a tracking device on the soldier’s car during an investigation that led to the indictment.

Kang told the informant that if he became an Islamic State member, he would be a suicide bomber and attack Schofield Barracks, a sprawling Army base outside Honolulu, according to an affidavit filed in the case.

The U.S. government first asked a judge to allow a tracking device to be placed on Kang’s car in October 2016 and applied for several extensions after orders granting it expired.

Kang watched the videos for four to five hours each day during the week and more on the weekends, the informant told agents in 2016. The informant “remembered feeling sick to his stomach, while Kang laughed and insulted the victims,” the affidavit said.

During the first week of September 2016, Kang told the informant “that if he were to do something like shoot up a large gathering, it would be out of his hatred for white people, the wicked and non-Muslims,” the affidavit said.

Kang began researching Islam in 2014, couldn’t wait to move to the Middle East to “join the cause” and was “only in the military for a paycheck,” the informant said, according to the affidavit.

Agents said in their applications for a tracking device that they needed to monitor him continuously because they feared he would carry out an attack.

Officials with the 25th Combat Aviation Brigade told the FBI they were concerned about their ability to monitor Kang, noting that he was to return from leave on May 25, 2017 — the same day as a change-of-command ceremony, the affidavit said.

Brigade personnel feared the large gathering “represented a target of opportunity for Kang should he want to harm members of the unit.”

Kang has been held without bail since his July 2017 arrest.

He is scheduled to be sentenced Dec. 10. Prosecutors and Kang agree to a 25-year sentence for charges that could have put him in prison for life if he was convicted at a trial.