U.S. officials say a Somali man accused of attacking a Canadian policeman with a car and knife entered the United States from Mexico on foot in 2011 before a judge ordered his deportation.

Customs and Border Protection spokeswoman Jackie Wasiluk said Wednesday that Hasan Sharif Abdulahi arrived at a port of entry near San Diego on July 12, 2011, with no documents and no legal status to enter.

Sharif was taken into custody and ordered deported to Somalia. But he was released two months later and then failed to report for removal. He entered Canada legally in 2012 and obtained refugee status.

Sharif is accused of ramming a car into the Alberta policeman, stabbing him and then leading officers on a high-speed chase in which four bystanders were hurt.