A Maryland man who collected cash payments from a foreign company to plot an ISIS attack in the United States and help the group develop weaponized drones was sentenced Friday to 20 years in prison.

Mohamed Elshinawy, 33, of Edgewood, pleaded guilty to supporting ISIS, terrorism financing and making false statements in connection with a terrorism matter, according to a statement from the U.S. attorney’s office in Maryland.

Between February and December of 2015, Elshinawy conspired with others to support ISIS and provide the terrorist group with financial services, material support and other resources, the government said.

“In various other conversations, Elshinawy pledged his allegiance to ISIS, described himself as its soldier, committed to making violent jihad, and asked that others convey his message of loyalty to ISIS leadership,” the statement from federal prosecutors said.

A company based in the United Kingdom also transmitted about $8,700 to Elshinawy to pay for a terrorist attack on U.S. soil, according to his plea agreement.

The owner of the company was a person from Bangladesh who went to Syria to help ISIS develop weaponized drone technology, according to Elshinawy’s plea agreement. The company also sent money to Elshinawy to buy drone technology and parts to ship to ISIS members in Turkey and Syria, he admitted in his plea.

When FBI agents confronted him in July 2015, he told authorities that he was planning to use the money to defraud ISIS and concealed his involvement with the designated terrorist organization, prosecutors said.

Elshinawy, a U.S. national of Egyptian descent, had also tried to recruit his brother to join ISIS, his plea agreement stated. Elshinawy deleted his social media messages with the U.K. business owner and with his brother. He also told his brother to warn the business owner that he had been “revealed and uncovered.”

An attorney for Elshinawy could not be immediately reached for comment.

Read more: