A Minnesota man was sentenced Wednesday to two years in federal prison for lying to the FBI during their investigation into the travels of young men who left the U.S. to join the Somali militant group al-Shabab.

Mahdi Hussein Furreh, 34, was also sentenced to three years of supervised release. He pleaded guilty in October 2014 to making false statements during the government's terror investigation, specifically admitting that he lied about contacting a man who's wanted for allegedly encouraging others to join al-Shabab.

Since 2007, roughly 22 young Somali men have left Minnesota to join al-Shabab in Somalia. About a dozen more people have since left Minnesota to join militant groups in Syria, including the Islamic State group.

According to court documents, Furreh lied during numerous contacts with authorities. Documents show Furreh and others brought two men to the airport in July 2012 so they could join al-Shabab in Somalia, and he later lied about it.

He also traveled to Kenya himself with plans to join al-Shabab, thinking the group would provide him with a better life. His attorney said that once in Kenya, he realized his mistake and tried to return to the U.S. Furreh was arrested in Kenya, and though he was not charged with a crime there, he again lied to authorities, documents show.

When back in the U.S., he lied to the FBI about contacting Cabdulaahi Ahmed Faarax, a Minnesota man who is wanted for allegedly encouraging others to join al-Shabab. Faarax is at large and believed to be in Somalia.

"I was scared and nervous," Furreh said about lying, adding, "That was a mistake and I should not have done it." U.S. District Judge Michael Davis said Furreh continued to lie for two years.

"You lie. You lie. You lie," Davis said. "You're a consistent liar. So why should I believe you?" Furreh faced a maximum of eight years in prison, but prosecutors asked for less, noting Furreh provided them with substantial assistance.

Over a sentencing hearing that spanned two days, Assistant Federal Defender Manny Atwal asked that Furreh be sentenced to the four days he already served, in addition to either supervised release or probation. She said he's done well on supervised release so far, and a lighter sentence would send a message to the community that, even for those who traveled, their lives would not be over if they return and do the right thing.

Assistant U.S. Attorney Charles Kovats argued that Furreh should be sentenced to about two years in prison, saying that lying to law enforcement should have consequences, and a sentence of time served should be reserved only for defendants who cooperate from the start.

"Doing the right thing, right away, matters," Kovats said.