A Somali refugee accused in a series of brazen attacks in Edmonton on Saturday was jailed in the U.S. in 2011 and ordered to be deported back to his home country.

But officials say Abdulahi Hasan Sharif eluded authorities during his supervised release and eventually ended up in Edmonton, where he is now charged in connection with an attack on a police officer and four pedestrians.

U.S. Immigration and Customs Enforcement confirmed that Sharif was in a U.S. detention centre in San Diego, Calif., in July 2011 when he was transferred into U.S. Immigration and Customs Enforcement (ICE) custody.

Officials say Sharif, 30, had no known criminal history at the time.

Sharif was later ordered to be removed from the U.S. by an immigration judge. He chose not to appeal the decision.

In Nov. 2011, he was released under certain supervisions and was required to report to ICE officials. However, in early 2012, officials say Sharif failed to report on his scheduled date.

Subsequent efforts to find the missing man, carried out by ICE Enforcement and Removal Operations, failed.

According to Public Safety Minister Ralph Goodale, Sharif crossed into Canada in 2012 by legal means at an official border crossing. He later received refugee status.

CTV News has learned that Sharif entered Canada directly from the U.S., not Somalia.

In a statement, Goodale’s office said officials were aware of Sharif’s detention but that because he was picked up in the U.S. for immigration reasons rather than criminality, it did not make him inadmissible to Canada. The statement added that there were no red flags.

Three years after arriving in Canada, Sharif was investigated by RCMP for having extremist beliefs. At the time, investigators decided that he did not pose a threat, and he was released.

Sharif is now the lone suspect charged after a driver struck an Edmonton police officer with a car, stabbed him and ran down four pedestrians with a cube van. A police chase ensued, and officers eventually flipped the vehicle on its side and arrested the suspect with a Taser and stun grenade.

He appeared in court Tuesday on 11 charges, including five counts of attempted murder.

An ISIS flag was found inside the vehicle after the incident. Police have not laid terrorism charges and say that their investigation is complex. Investigators said it is believed that the suspect acted alone.

No one was killed in the attack. The police officer, Const. Mike Chernyk, has since been treated and released, while two victims remained in hospital as of Monday.

Sharif also faces charges of dangerous driving, criminal flight causing bodily harm and possession of a weapon for a dangerous purpose.

His case has been put over until Nov. 14 to give him time to hire a lawyer.

With files from The Canadian Press