In the jittery months after the 9/11 attacks, the federal government created a program that required thousands of Arab and Muslim men to register with the authorities, in an effort to uncover terror links and immigration violations.

After complaints that the practice, known as special registration, amounted to racial profiling, the Homeland Security Department scaled back the program in 2003, and ended it late last month, saying it “no longer provides a unique security value.”

But for Mohammed G. Azam, a 26-year-old Bangladeshi native who came to the United States when he was 9, its legacy lives on. When he registered in Manhattan in 2003, officials began deportation proceedings, and now, eight years and numerous hearings later, his case has outlasted the program.

Mr. Azam is one of hundreds, or perhaps thousands, of people still caught in the program’s net, immigration experts say.