A U.S. soldier who was accused Thursday of planning to attack troops near Fort Hood, Tex., has told investigators that he was acting in support of Maj. Nidal M. Hasan, the Army psychiatrist who has been charged in the killing of 13 people at the base in 2009, according to congressional and federal officials.

Pfc. Naser Abdo, 21, was arrested in Killeen, Tex., after authorities said they discovered bombmaking materials in his motel room, as well as a copy of an article from the al-Qaeda magazine Inspire, which is produced by the terrorist group’s Yemen affiliate.

The officials said Abdo was planning to set off bombs at locations outside the base where soldiers gather and to follow the explosions with gunfire.

“I would classify this as a terror plot,” Police Chief Dennis Baldwin told reporters in Killeen. Law enforcement officials said Abdo would be charged in federal court with possession of bombmaking materials, among other offenses.

It could not be learned Thursday whether Abdo has retained a criminal lawyer.

The emergence of another alleged plot to attack troops at the same base where Hasan is accused of striking may intensify fears that there is a growing terrorist threat from self-radicalized Americans and raise questions about whether the military can adequately identify internal threats. Hasan was arraigned in military court this month on capital murder charges but has not entered a plea.

A U.S. counterterrorism official said authorities have not discovered any direct communication between Abdo and foreign Islamist extremists.

Abdo, attached to the the 101st Airborne Division at Fort Campbell, Ky., recently sought conscientious objector status because he felt that as a Muslim he could not be deployed to fight in a war zone.

In May, on the same day his status was granted, he was charged with possession of child pornography on a computer he used. Abdo then left Fort Campbell without permission on about the July Fourth holiday and returned to Texas. His home town is listed as Garland.

James Branum, an Oklahoma City lawyer who represented Abdo in his conscientious objector and child pornography cases, described Abdo as gracious, hospitable and “very devoutly religious,” saying he prayed five times a day.

Abdo denied the pornography allegations and said he thought the military was retaliating against him for trying to leave the service.

In a 2010 interview with CNN about his efforts to be discharged, he said he had spoken with a Muslim chaplain in the military in an attempt to reconcile his faith with a possible deployment but could not do so.

“I was under the impression that I could serve both the U.S. Army and my God simultaneously,” Abdo said, explaining why he enlisted in the first place.

Attempts to reach Abdo’s family were unsuccessful. His mother lives in the United States, Branum said, but his father lives in the Middle East. His wife is Canadian.

Branum said Abdo’s legal name is Jason Naser Abdo.

Officials said that after he was charged with child pornography, Abdo hitchhiked, paid for rides and caught buses from Kentucky to Killeen. After checking into an Americas Best Value Inn there, he went to the same gun store where Hasan bought a high-powered semiautomatic pistol two years ago.

David Cheadle, store manager of Guns Galore, said Abdo, dressed in street clothes, grabbed six cans of smokeless gunpowder but asked what smokeless gunpowder was — a question that prompted suspicion. He also purchased three boxes of 12-gauge shotgun shells and a .40-caliber magazine for a semiautomatic handgun. It is not clear what kind of guns, if any, he had in his possession.

Abdo arrived in a taxi, paid $250 in cash and on the way out the door said, “I hope your day goes better than mine,” Cheadle said.

“It just didn’t sit right,” he said, adding that Greg Ebert, an employee who spoke with Abdo, then called the police.

After tracing the taxi, investigators discovered where Abdo was staying and that there was an outstanding warrant for his arrest. The taxi driver told investigators that Abdo also went to a military surplus store, where they later learned that he had purchased military uniforms with Fort Hood markings, according to Rep. John Carter (R-Tex.) and a federal official who spoke on the condition of anonymity because the investigation was ongoing.

“This could have been tragic, but the good news is that the gun store operator did a very good job,” said Carter, whose district includes Killeen and who was briefed on the investigation.

Carter said that Abdo, who was arrested Wednesday, was apparently scouting locations in Killeen, including restaurants, to carry out an attack. After the bombs exploded, he intended to exploit the chaos to shoot any survivors, according to Carter and the federal official.

Baldwin, the Killeen police chief, described Abdo as “a very dangerous individual.”

“We would probably have been giving a different briefing here if he had not been stopped,” Baldwin said.

Staff writers David Fallis, Greg Jaffe and Greg Miller and staff researcher Julie Tate contributed to this report.