A former top legal adviser to the Immigration and Customs Enforcement bureau was sentenced to 48 months in prison for wire fraud and identity theft affecting aliens, the Justice Department announced on Thursday.

Raphael Sanchez, 44, of the ICE Office of Principal Legal Advisor based in the Pacific Northwest, had pleaded guilty in February to running a scheme to defraud aliens in various stages of immigration removal by using their personally identifiable information to open lines of credit and personal loans in their names. He would then manipulate their credit bureau files, transfer funds to himself and purchase goods for himself using credit cards issued in their names, Justice said.

U.S. District Court Judge Robert Lasnik of the Western District of Washington also ordered Sanchez to pay $190,345.63 in restitution.

“Raphael Sanchez was entrusted with overseeing the honest enforcement of our country’s immigration laws,” said acting Assistant Attorney General John Cronan of the Criminal Division. “Instead, Sanchez abused that trust, and capitalized on his position at ICE to exploit his victims and line his own pockets.”

Added ICE Principal Legal Advisor Tracy Short, “We cannot let one bad actor detract from the work the agency’s dedicated employees in Seattle and across the world are doing to ensure our national security and uphold public safety. Our employees are held to the highest standards of professional conduct….Corruption will not be tolerated.”

Sanchez admitted that he used ICE’s official computer database systems and official, hard-copy immigration A-files to obtain the personal information. He then used his work computer to forge identification documents, including Social Security cards and Washington State driver’s licenses in the victims’ names, Justice added.

Sanchez then listed his residence as the aliens’ home addresses on account paperwork, even creating some public utility account statements in the aliens’ names, email accounts, and earnings statements so as to appear authentic.

The $190,000 he spent from his gains was used at online accounts at Amazon, Square, Venmo and Coin. Sanchez also registered in the aliens’ names at credit monitoring services and claimed three of his victims as dependents on his tax returns for 2014, 2015 and 2016.

Working the case were ICE’s Office of Professional Responsibility, the FBI, and the U.S. Postal Inspection Service. The Justice Department trial attorneys were Luke Cass and Jessica Harvey of the Criminal Division’s Public Integrity unit.