The U.S. District Court in Alexandria. (Gerald Martineau /The Washington Post)

A 29-year-old from Woodbridge, Va., who planned to travel to Syria and join the Islamic State will instead spend the next 81/2 years in prison.

Joseph Hassan Farrokh was sentenced Friday in federal court in Alexandria to 102 months of incarceration in addition to a decade of supervised release for conspiring to provide material support to the terrorist organization.

Farrokh pleaded guilty in March, admitting that he and Mahmoud Amin Elhassan, 25, planned to make their way to Syria to join the extremist group.

The two spent many months discussing how to put that plan into action. They communicated using phone apps that they thought would be hidden from federal authorities, according to prosecutors. Farrokh decided to shave his beard and fly out of Richmond International Airport to attract less scrutiny. He had told his family that he was planning to go to Saudi Arabia to study, according to prosecutors.

Elhassan used Farrokh’s wedding reception last August to introduce his friend to someone he thought was engaged in terrorist activity and could help facilitate their travel, according to prosecutors.

In fact, their new ally was an FBI informant who helped track the pair over the next five months. When Elhassan drove Farrokh to Richmond in January for a flight to Jordan, they were both arrested.

According to court records, Farrokh was born in Pennsylvania and had been living in Woodbridge since July 2015. Elhassan, a Sudanese native who came to the United States legally in 2012, also lived in Woodbridge.

Prosecutors had asked the court to sentence Farrokh to at least 188 months in prison. Farrokh’s attorney, Joe Flood, asked the court for a lesser sentence of 63 months, arguing that Farrokh’s radicalism was a shallow and recent development encouraged by Elhassan, who was far more militant. Farrokh, Flood said in court filings, was a struggling opiate addict in search of an identity who latched onto the Islamic State in spite of misgivings.

Across the country, 92 men and women have been charged with crimes connected with the Islamic State. So far, 41 have been convicted.