A Pennsylvania man pleaded guilty on Tuesday to charges he encouraged attacks on U.S. targets through an Islamist militant website, the U.S. Attorney's office said.

The man, 22-year-old Emerson Begolly, also pleaded guilty to being armed during a struggle in which he was accused of biting two FBI agents, a charge that could carry a life sentence.

Prosecutors said Begolly, accused of being an active moderator on an English-language forum on the Ansar al-Mujahideen website, had asked others to engage in violent acts, particularly in the United States, court documents showed.

Today's guilty plea underscores the need for continued vigilance against home-grown extremism and use of the Internet to incite violence, Assistant Attorney General Lisa Monaco said in a statement.

The indictment described the Ansar al-Mujahideen site as a popular, internationally known Islamic extremist web forum used by its members to translate, promote and distribute jihadist propaganda. It was reported to have English and German forums in addition to an Arabic forum.

Begolly, in postings to the site last year, was accused of suggesting the use of firearms, explosives and propane tanks in attacks on police stations, post offices, synagogues, military facilities, train lines and other targets.

Through his own prolific postings..., Begolly has solicited others to engage in violent acts of terrorism, particularly within the United States, the indictment said.

Authorities gave little information on Begolly including how he may have become involved with the militant forum.

In January, Begolly assaulted two FBI agents as they tried to interview him while he was sitting in a car in the parking lot of a fast food restaurant in Bethlehem, Pennsylvania, court documents said.

During the altercation he bit the agents' fingers, drawing blood, and tried to reach for a loaded 9-millimeter pistol that was in his jacket pocket, according to the documents.

The finger biting, prosecutors said, was consistent with a posting in which he urged his audience not to be taken alive by law enforcement, to always carry a loaded firearm, and to aggressively resist any law enforcement encounter including biting fingers if necessary.

Begolly pleaded guilty to solicitation to commit a crime of violence, which carries a maximum penalty of 10 years in prison, and possessing a firearm in furtherance of a crime of violence, which carries a maximum penalty of life in prison, a spokeswoman for the U.S. Attorney's office said.

Sentencing was scheduled for November 29.

Begolly's attorney was not immediately available to comment.

(Editing by Barbara Goldberg and Cynthia Johnston)