MINNEAPOLIS - A Somali-born Canadian citizen who admitted he attended al Qaeda training camps in Afghanistan and lectures by Osama bin Laden was released from federal prison Friday after nearly seven years in custody and deported to Canada.

Mohammed Abdullah Warsame, 37, was released from the Federal Correctional Institution in Indiana and taken to the U.S.-Canadian border, according to a statement from U.S. Immigration and Customs Enforcement.

From there, Warsame was heading to a cousin's house in Toronto, said his uncle, Abdallah Warsame.

"They are waiting for him," Abdallah Warsame said. "He called them from the border. ... We don't have much information. But he's in Canada."

Family attorney Peter Erlinder said Warsame walked over the border at Windsor, Canada, and took a taxi to Toronto.

U.S. prosecutors say Warsame is a jihadist who received military training in al Qaeda camps, dined with bin Laden and went to the Taliban's front line. Warsame's attorneys depicted him as a bumbling idealist who was seeking a utopian society.

He pleaded guilty in May 2009 to conspiracy to provide material support and resources to a foreign terrorist organization. He was sentenced in July 2009 to seven years and eight months in prison, but was given credit for time served and good behaviour.

As part of the plea agreement in U.S. District Court in Minnesota, Warsame agreed to be deported to Canada after serving his sentence. He is not allowed back in the U.S. without permission from federal authorities.

"There is no place in this country for anyone who advocates violence by associating, supporting or conspiring with terrorists," ICE Director John Morton said in a statement Friday.

According to documents and information from court proceedings, Warsame travelled from his home in Toronto to al Qaeda training camps in Afghanistan in the spring of 2000. He stayed at al Qaeda guest houses and taught English to nurses at a medical clinic for al Qaeda associates.

Prosecutors said Warsame called his time in one camp "one of the greatest experiences" of his life.

Warsame returned to Canada in spring 2001, and al Qaeda paid for the trip. Months later, Warsame wired money to a bank account in Pakistan at the request of an al Qaeda associate, according to the plea agreement.

He moved to Minneapolis and continued to communicate with people he met in Afghanistan and Pakistan. Prosecutors said that even after the Sept. 11 terrorist attacks, he passed information to al Qaeda operatives about border entries and whereabouts of jihadists -- only stopping when he was arrested in December 2003.

Warsame spent nearly 5 1/2 years in solitary confinement while awaiting trial. He ultimately pleaded guilty, and once sentenced, was sent to the medium-security facility in Indiana.

Erlinder said he was happy with Warsame's release, especially after his long pretrial detainment and confinement that limited communication with family members.

The U.S. Attorney's Office in Minnesota had no comment on Warsame's release.

When given a list of questions, including whether Warsame would be monitored in Canada, David Charbonneau, a spokesman with Public Safety Canada, said he could not comment. But, he said, everyone entering the country, including citizens, is examined by Canadian border authorities.

"Terrorism has no place in Canada and will not be tolerated," Charbonneau said in an email. "The Government of Canada is committed to ensuring the safety and security of its citizens."