Immigration and Customs Enforcement (ICE) officials targeted a man for deportation shortly after he was granted a marriage exception for his immigration status, ABC News reported.

Sergio Avila immigrated illegally to the U.S. with his uncle when he was 7 years old. But after he married Army Chaplain Tim Brown last year, the couple filed for a marriage exception to allow Avila to become a legal citizen.

The couple was granted the exception by U.S. Citizenship and Immigration Services last month.

ADVERTISEMENT

However, citing a past deportation order, ICE took Avila into custody last week. The agency targeted Avila "due to his status as an immigration fugitive and convicted criminal alien,” ICE said in a statement to ABC News.

A federal judge had ordered Avila to be removed from the U.S. in 2002 after he had been caught trying to enter the country illegally in Texas the year before. He was also convicted for driving while intoxicated in 2015.

ABC News reported that the outstanding detention order against Avila superseded the marriage exception.

Brown, Avila’s husband, is now fighting the order. He told ABC News that the detention came as a surprise because ICE agents had previously told him that they wouldn’t take the spouse of a military service member into custody and had thanked him for his service.

"U.S. Immigration and Customs Enforcement (ICE) respects the service and sacrifice of those in the military and the families who support them and is very deliberate in its review of cases associated with veterans and active-duty service members," ICE said in a statement on Monday.

"Foreign nationals illegally present in the United States are generally not eligible to adjust status through marriage without first leaving the United States," the agency continued.

Avila was released from ICE custody on Monday while an immigration court weighs an appeal on the order.

-Updated 8:45 p.m.