“Credit where credit is due,” Mr. Nemazee said.

Mr. Trump said recently at the White House that “unfair sentencing rules were contributing to the cycle of poverty and crime,” and since the First Step Act’s passage, more than 500 people with “unfair sentences have been released from prison and are free to begin a new life.”

But Mr. Nemazee left prison under a less publicized part of the bill that allows certain offenders who are over 60 and not considered a threat to others to be released into home confinement if they have completed two-thirds of their sentence.

In home confinement, Mr. Nemazee does not wear an ankle bracelet, but officials may call him on a landline late at night or early in the morning to verify he is at home. He may be summoned for a urine test at any time and must submit his weekly schedule for approval, he said.

Still, it feels a lot like freedom. He may leave his apartment to go to work, the gym, religious services or appointments with his doctors and lawyers. He may also go out to lunch, “which is always a treat, given where I have been the last eight and a half years.”

“Home confinement is a huge improvement over prison in every respect,” Mr. Nemazee said.

The Bureau of Prisons has said that since the bill’s passage, 10 prisoners — of 23 thus far deemed eligible — have been released into home confinement. The bureau would not identify the prisoners or comment on their cases.