The federal government is reviewing the case of a Somali refugee accused in the weekend attacks in Edmonton on a  police officer and four pedestrians to determine whether changes to the asylum process are needed.

Abdulahi Hasan Sharif was ordered deported from the United States in 2011 by a U.S. immigration judge before he crossed legally into Canada and gained refugee status.

"We are looking into exactly what happened in this situation," Prime Minister Justin Trudeau said today.

"We're certain that we have asylum processes that needed to be followed when someone presents themselves at our border, we have rules to follow and we make sure those rules are followed.

Ottawa reviewing Edmonton attacker's entry into Canada0:39

"We're looking into the whole system and will reflect on whether we need to do things differently certainly in the future than the way they were done in 2012. But the priority is always making sure that we're defending the values and rights of Canadians while keeping our communities safe."

Sharif, 30, is charged with five counts of attempted murder, four counts of criminal flight causing bodily harm, and one count each of dangerous driving and possession of a weapon for a dangerous purpose, and remains in custody. 

In July 2011, U.S. Customs and Border Protection transferred Sharif into the custody of U.S. Immigration and Customs Enforcement at Otay Mesa Detention Center in San Diego, Calif., according to Jennifer D. Elzea, acting press secretary for the ICE office of public affairs.

Order to remove to Somalia

Two months later, on Sept. 22, 2011, an immigration judge ordered Sharif removed to Somalia. Sharif waived his right to appeal that decision.

But Sharif was released on Nov. 23, 2011, on an ICE order of supervision, "due to a lack of likelihood of his removal in the reasonably foreseeable future," Elzea said in a statement to CBC News.

Sharif failed to report to the ICE enforcement and removal operations centre on his scheduled date: Jan. 24, 2012.

During an event in Brampton, Ont., Immigration Minister Ahmed Hussen confirmed Sharif entered at an official port of entry, went through the "regular process" and was granted refugee status later that year. He declined to provide any more details, citing an "active, ongoing investigation."

He stressed that decisions on whether to grant asylum are not made by the government but by the arms' length, independent Immigration and Refugee Board.

"That board is the one that is responsible for determining the merits of each and every case when it comes to asylum claims," he said.

Tactical officers at suspect's apartment

Heavily armed police tactical officers approach the apartment building Sunday afternoon that was home to Sharif. (Travis McEwan/CBC)