A Pennsylvania 19-year-old pledged allegiance to the Islamic State group, used Twitter to spread its propaganda and had a backpack with ammunition that suggests he might have been plotting an attack, federal authorities said Thursday.

Jalil Ibn Ameer Aziz, of Harrisburg, was arrested Thursday and charged with two counts of attempting to provide material support to terrorists. He had an initial court appearance and will be held pending a detention and preliminary hearing next week.

Court documents said a "go bag" or "tactical-style backpack" found in Aziz's closet during a Nov. 27 search contained a high-capacity magazine loaded with ammunition, a modified kitchen knife, a thumb drive, a tin filled with medicine and a full face mask similar to those worn by Islamic State militants. Aziz may have been "preparing to conduct or assist others in conducting an attack in the United States," according to a criminal complaint.

Aziz used Twitter to advocate violence against U.S. citizens and military members and to disseminate Islamic State propaganda, and also tried helping others travel to Syria to fight for the Islamic State group, authorities said.

A message left at Aziz's home wasn't immediately returned Thursday. A hand-written sign tacked to the door said: "No Comment No News! No Tresspassing."

"We will remain vigilant in our efforts to hold accountable any and all those who seek to provide material support to terrorists, and to disrupt potential attacks in the United States before they happen," Assistant Attorney General John Carlin said in a statement.

Aziz "espouses violent jihadist beliefs and is a fervent supporter" of the Islamic State group, according to the criminal complaint.

He has used 57 different Twitter accounts -- all traced to the home he shares with his parents -- to advocate violence, encourage people to fund jihadist groups and express a desire to travel to territory controlled by the Islamic State group, the complaint said. Aziz would create a new account each time Twitter suspended him for violating its terms of service, court documents said.

Aziz has also tried promoting himself online as "someone who can facilitate travel on behalf of ISIL," said the complaint, using an acronym for the Islamic State group.

Harrisburg Mayor Eric Papenfuse told pennlive.com that the city was aware of Aziz "and at no point was public safety in jeopardy."