A Massachusetts man thought a $10 scratch ticket had just changed his life forever.

It did — but not in the way he expected. Days after posing with an oversized $1 million check, Ariel Antonio Velasquez-Morales was arrested by ICE officers in East Boston. The winning photo that announced his sudden fortune also helped put his name and face in front of federal immigration authorities.

U.S. Immigration and Customs Enforcement reports that Velasquez-Morales entered the country illegally from El Salvador in 2013. Border Patrol officials in Texas issued him a notice to appear and released him with a list of free legal service providers. An immigration judge ordered him removed on April 24, 2014, according to ICE. The agency states he remained in the United States for more than a decade after that final removal order.

Velasquez-Morales bought the winning scratch-off at an East Boston market and chose the cash option, worth a one-time payment of $650,000 before taxes. ICE confirmed the lottery ticket led agents to him. On November 24, ICE Boston arrested Velasquez-Morales during operations in East Boston.

The case highlights Massachusetts law permitting anyone age 18 or older to purchase retail lottery tickets regardless of citizenship status. The state typically publishes winners’ names and images publicly. However, Velasquez-Morales’ win did not erase his federal immigration order. ICE Assistant Director of Public Affairs Micah Bock described the situation with six words: “Looks like his luck ran out.”

The agency emphasized that a final immigration removal order remains in effect even after sudden windfalls. Velasquez-Morales remains in ICE custody pending removal from the United States. The $1 million ticket gave him a brief moment in the spotlight, exposing the unfinished business the immigration system had carried since 2014.

Luck can buy a winning ticket. It cannot cancel a judge’s order.