A U.S. judge sentenced 26-year-old Madhi Hashi — a one time Somali migrant to the United Kingdom — to nine years on Friday for joining Islamic terrorist organization al-Shabaab in Somalia.

Between December 2009 and August 2012 Hashi was a member of al-Shabaab, supporting the group’s “violent extremist agenda” according to the United States Attorney’s Office.

He and two citizens of Sweden left Somalia to travel to Yemen with the intention of joining al Qaeda in the Arabian Peninsula according to prosecutors cited in Reuters. The three terrorists were intercepted and apprehended in August 2012 while passing through Djibouti thus preventing completion of the journey. Hash was deported to the U.S. in November 2012.

Hashi first came to the United Kingdom with his family when he was five years old according to the DailyMail. CNN wrote that the family was “fleeing the civil was in Somalia.” Hashi’s family has attempted to claim that U.K. intelligence agency MI5 harassed him to join the organization. The organization CAGE has defended Hashi. CAGE advocates for the closure of Guantanamo Bay and has welcomed the release of its prisoners. In 2012 The United Kingdom revoked his citizenship as he faced Islamic terrorism allegations.

“This defendant left his family and his adopted home in the United Kingdom behind so he could offer himself in support of al-Shabaab, a violent terrorist organization that has demonstrated its capabilities and motives in numerous terrorist attacks and that has publicly called for attacks against the United States,” U.S. Attorney Capers said according to the U.S. Attorney’s Office, Eastern District of New York.

The U.S. Attorney’s Office stated that al-Shabaab denotes men such as Hashi as “foreign fighters.” Al-Shabaab has recruited such individuals to live, train and often fight alongside native Somali fighters.

The USAO listed the value of such foreign fighters provided to al-Shabaab:

For example, al-Shabaab frequently made Western foreign fighters the face of its fund-raising and propaganda efforts as part of a broader strategy of emphasizing that the conflict in Somalia was part of a global jihad aimed at creating an Islamic caliphate.  In addition, al-Shabaab assesses that Westerners have the potential to more easily cross certain international borders.  Because al-Shabaab frequently employs suicide bombings, as it did in the Kampala, Uganda, in 2010 resulting in 74 deaths, freedom of travel was particularly crucial to al-Shabaab’s external terror operations.

“Hashi travelled to Somalia to join and fight on behalf of al-Shabaab in their foreign terrorist fighter ranks,” said Assistant Attorney General Carlin.

During his time in Somalia Hashi spent time with well-known jihadist Omar Hammami during his time with al-Shabaab. Hammami grew up in Alabama and died in a gun battle in 2013. He converted to Islam in his teens after a trip to his father’s home country of Syria.

Hashi pleaded guilty last May to conspiring to provide material support to designated foreign terrorist organization al-Shabaab. Prosecutors had pushed for a 15 year sentence.

Last week the Swedish citizens arrested alongside Hashi — Ali Yasin Ahmed and Mohamed Yusuf — each received an 11 year sentence for their crimes according to the Reuters report. The two had left Sweden for Somalia between December 2008 and August 2012.

Follow Michelle Moons on Twitter @MichelleDiana