FILE - An aerial view of the Pentagon building in Washington, June 15, 2005.
FILE - An aerial view of the Pentagon building in Washington, June 15, 2005.

A Virginia man has pleaded guilty to trying to help Islamic State militants, and he faces up to 20 years in prison.

The U.S. Justice Department said Haris Qamar, 26, tried to help Islamic State militants encourage lone wolf attacks in Washington, D.C.

Qamar told a federal court in Alexandria, Virginia, Monday that he used social media to connect with people to promote Islamic State.

Prosecutors say Qamar worked with a government informant to photograph and film landmarks in the Washington region, including the Pentagon.

"This case demonstrates the reach terrorist organizations have through social media and the threat that they pose to our national security," said Assistant Director in Charge Paul Abbate. "When Qamar could not travel overseas, he attempted to assist ISIL's propaganda campaign for the purpose of inspiring lone wolf attacks in the Washington, D.C., area."

ISIL is one of several acronyms for Islamic State.

The Justice Department said Qamar wanted to travel overseas to join Islamic State, but his parents prevented him by taking away his passport. It said Qamar told the informant that if his parents gave him back his passport, "I'm done, I leave."

Also Monday, a federal grand jury charged a Bangladeshi man living in the state of Maryland with trying to provide support to Islamic State.

According to court documents, Nelash Mohamed Das, 24, allegedly planned to kill a U.S. military member in support of Islamic State militants. The documents say that Islamic State members and supporters have posted identifying information about U.S. military personnel in the hopes that those inspired by the group would carry out attacks.

If convicted, Das faces a maximum sentence of 20 years in prison.