As soon as he came to the United States, according to court documents, Mahmoud Elhassan was looking for supporters of Islamist terrorism groups.

“One of our forgotten prisoners,” the Sudanese immigrant wrote on Facebook of a man convicted in a bombing plot. “I wished to work with him one day, but the 1st day I came to the states I found that the disbelievers imprisoned him.”

In 2014, Elhassan messaged a radical Sudanese cleric, saying, “Here with you is a sleeper cell.” He asked to be connected to like-minded young men, saying, “I am feeling that I am alone and I don’t have anyone but the brothers on the internet.”

But the supposed ally the cleric found for Elhassan was actually an FBI informant. When he tried to help another man, Joseph Farrokh, travel to Syria, both were arrested and eventually pleaded guilty to terrorism-
related charges. Elhassan, 26, will be sentenced Friday in federal court in Alexandria.

Elhassan, who lived in Woodbridge, admitted that he drove Farrokh to the Richmond Airport and then lied to agents about his friend’s plans. At first he appeared to be an accessory to Farrokh’s plans. But prosecutors now say Elhassan was the instigator, having been radicalized long before the two met. Before his sentencing, Farrokh wrote in court filings that his allegiance to the Islamic State was shallow and brief, spurred by personal problems. He was sentenced to 8½ years in prison.

Elhassan’s attorneys say he, too, was shaped by trauma. His father was abusive, according to his court filings, and his mother fled with her children to Egypt. They all made it to the United States as legal residents by 2012, but his mother died two years later. About the same time, the father of a woman Elhassan hoped to marry rejected his proposal. All along, he suffered from severe kidney and liver problems that have caused periodic hospitalizations.

“The timing and particular circumstances of Mr. Elhassan’s conduct when viewed in the context of the emotional upheaval he was experiencing at the time of the offense, particularly his undiagnosed and untreated depression, post-traumatic stress disorder and perfect storm of tragic family circumstances can explain — but cannot justify — how he was drawn into such a simplistic and naive fundamentalist worldview at the heart of the resulting conduct,” his attorneys wrote.

They ask for a sentence of four to six years; prosecutors want Elhassan to be behind bars far longer.

“Childhood abuse cannot be an excuse for aligning with and supporting a terrorist organization,” they wrote in their sentencing filing. “Drawing a causal connection between childhood abuse and terrorism does a grave disservice to victims of child abuse.”

The maximum sentence for Elhassan’s crimes in 28 years.