HONOLULU — An active duty U.S. soldier was arrested on terrorism charges after authorities say he pledged allegiance to the Islamic State group and said he wanted to "kill a bunch of people."

The FBI arrested Sgt. 1st Class Ikaika Kang, 34, in a suburb of Honolulu over the weekend after a yearlong investigation involving multiple undercover officers and confidential informants. He made an initial appearance in federal court on Monday.

Kang's court-appointed defense attorney, Birney Bervar, said it appears his client may suffer from service-related mental health issues of which the government was aware but neglected to treat. Bervar declined to elaborate.

He said Kang was "a decorated veteran of two deployments" to Iraq and Afghanistan.

A 26-page affidavit from FBI Special Agent Jimmy Chen filed in court Monday detailed how Kang thought he was dealing with people working for Islamic State but who were actually undercover agents.

Paul Delacourt, the FBI special agent in charge of the Hawaii bureau, said Kang gave military documents to people he believed would give them to Islamic State, but none of them got to the organization. He told reporters the FBI believed Kang was a lone actor and wasn't affiliated with anyone who poses a threat.

On Saturday, agents arrested him after he pledged loyalty to Islamic State leader Abu Bakr al-Baghdadi and said he wanted to "take his rifle, his magazines and kill 'a bunch of people.'"

Kang and the agents together made combat training videos he believed would be taken to the Middle East to help prepare the group's soldiers to fight American forces, according to the affidavit. Kang had received the highest level of combat training available in the Army and was a mixed martial arts enthusiast.

Also on Saturday, Kang and an undercover agent allegedly went shopping for a drone to give to Islamic State fighters.

Kang said the drone would allow the fighters to view the battlefield from above "to find tank positions and avenues for escape" from U.S. soldiers, the affidavit said. He used his debit card to pay nearly $1,400 for the drone, Go-Pro camera, and related equipment. The agent paid him $700 to split the cost.

Kang, a trained air traffic controller based at Hawaii's Wheeler Army Airfield, had his military clearance revoked in 2012 for making pro-Islamic State comments while at work and on-post and threatening to hurt or kill fellow service members.

His clearance was reinstated a year later after he completed military requirements.

However, the affidavit says the Army believed Kang was becoming radicalized in 2016 and asked the FBI to investigate.

Kang has two firearms registered in his name, an AR-15-style assault rifle and a handgun. After the shooting last summer at a gay nightclub in Orlando, Florida, he told a confidential source that the "shooter did what he had to do and later said that America is the only terrorist organization in the world," according to the affidavit.

The document alleges he also later told the same source that "Hitler was right, saying he believed in the mass killing of Jews."

He told the source he was angry at a civilian who had taken away his air traffic controller's license and that he wanted to torture him, the affidavit said.

"Kang said that if he ever saw him again, he would tie him down and pour Drano in his eyes," the affidavit said.

Kang is from Hawaii, Delacourt said.

He enlisted in the Army in December 2001, just months after the Sept. 11 attacks. He served in South Korea in 2002-2003. He deployed to Iraq from March 2010 to February 2011 and Afghanistan from July 2013 to April 2014.

Kang was scheduled to appear in court for a detention hearing on Thursday.

Red tape with the word "evidence" on it covered part of the door to the Kang's apartment in the Honolulu suburb of Waipahu.

Pua Edayan, the office manager at the condo complex, described Kang as "a quiet person."

Dee Asuncion, a real estate agent who represented Kang when he bought his home less than a year ago, said he came across as a "very respectful guy." She said he was "on the shy, quiet side."

But looking back she said there was one conversation that seemed strange to her. He talked about having respect for the ideology of Islamic terrorist groups.

"It sounded like he was just curious," she said, adding that in the same conversation he talked about helping his dad renovate his home.

"I feel very sad," Asuncion said. "I feel bad for him that he went down that road. I don't know exactly what he did."