A man from Maryland was charged with attempting to aid Daesh in connection with an attack on US military personnel.

A Maryland resident has been charged with plotting to kill a US military member on behalf of Daesh, federal officials say.

Nelash Mohamed Das, who is a Bangladeshi citizen, was tried on Monday and was also charged with attempting to provide material support to the terrorist group.

Federal agents picked up on the alleged plans of Das and placed him under surveillance before he was arrested.

At one point, Das received a gun from a confidential source, the officials said, adding, he arrived at the Maryland address of his target On September 30.

At the time, “Das believed that the firearms could fire ammunition; in reality, they had been rendered inert by the FBI,” federal officials said, noting he was arrested there after a chase.

A release from the US District Court for the District of Maryland states, “In a meeting on September 11, 2016, Das confirmed that he was committed '100%' to conducting an attack and, 'That’s like my goal in life.' In a meeting the following day Das stated that he wanted to get paid by ISIL for future killings, but would do it for free as well. Das further confirmed that he specifically wanted to target United States military personnel.”

During a court session on Monday, he was ordered detained until a hearing on Thursday.

Das, who is a legal permanent resident, now faces up to 20 years in prison.

He expressed his support to Daesh using social media from September 2015 to early 2016. He also supported terrorist attacks in Paris, France and San Bernardino, California.

On November 13, 2015, over 150 people were killed in multiple coordinated attacks on Friday in one of the deadliest assaults to hit the French capital since the World War II.

On December 2, 2015, 14 people were killed and 22 others were seriously wounded in a terrorist attack at the Inland Regional Center in San Bernardino.

An officer picking up a weapon near the site where the two suspects in the San Bernardino, Calif., mass shooting were shot and killed by police. (photo by Reuters)

Daesh has been ravaging Iraq and Syria since 2014. The terrorist group has overrun territory in both countries and has declared the city of Raqqah in Syria and Mosul in Iraq as its so-called headquarters.

The Takfiri terrorists have also conducted terrorist attacks in some countries across Europe.