DENVER — A refugee from Iraq charged with shooting a Colorado police officer last week was set for deportation before a federal appeals court ruled in 2016 that a portion of immigration law defining violent crime was too vague, according to a Department of Homeland Security official. The DHS official, who was not authorized to discuss the case on the record and spoke to The Associated Press on condition of anonymity, said Monday that federal immigration authorities began deportation proceedings against Karrar Noaman Al Khammasi after he violated the probation terms of a felony trespassing plea in 2015.

Karrar Noaman Al Khammasi El Paso County

The official said an immigration judge ordered on June 13, 2016 that Al Khammasi be removed from the country.

Four months later, federal prosecutors ended the deportation proceedings, citing an unrelated 10th Circuit Court of Appeals ruling that found a portion of federal immigration law defining what makes crimes violent and making it easier to deport someone convicted of such a crime too vague. He was released on Nov. 7, 2016, the official said.

In the appeals case, Moldova native Constantine Fedor Golicov was convicted in Utah of failing to stop at a police officer's command, prompting immigration officials to begin deportation proceedings against him. On appeal, Golicov argued that federal law outlining "classes" of immigrants who could be deported, including those convicted of a "crime of violence," was unconstitutionally vague and should not be used to justify his removal from the country.

Get Breaking News Delivered to Your Inbox

The U.S. Supreme Court took up a similar case this year, striking down part of federal immigration law making it easier to deport immigrants convicted of "a crime of violence." Justice Neil Gorsuch, nominated by President Donald Trump, joined the court's four liberal justices in that 5-4 decision.

After the decision, Trump tweeted that "it means that Congress must close loopholes that block the removal of dangerous criminal aliens, including aggravated felons."

The Colorado Springs Police Department said Monday that the injured officer, Cem Duzel, remained in "critical, but stable, condition."

Police Chief Pete Carey said Duzel, 30, was among several officers who responded to a call about shots fired near the U.S. Olympic Training Center. Carey said the officers found an armed suspect and the officer was injured in an exchange of gunfire.

Al Khammasi, 31, was wounded and remained hospitalized on Monday. His attorney, Jennifer Chu, declined comment on Monday when reached by phone.

Court records suggest he lived in the area for at least five years, but it's not clear what drew him to Colorado. According to the DHS official, Al Khammasi was granted refugee status and arrived in the United States in May 2012, flying to Chicago from Turkey.

According to The Gazette in Colorado Springs, at the time of the shooting Al Khammasi was free on $1,000 bail on a charge of weapon possession by a previous offender. He also had other encounters with law enforcement, the newspaper reported.