Uli Seit for The New York Times

The federal immigration officer had already pleaded guilty to coercing oral sex from a 22-year-old Colombian woman who was seeking a green card as the wife of an American citizen. But the officer, Isaac R. Baichu, whose demands for sex were caught on tape by the woman in December 2007, still hoped to avoid his negotiated sentence, 1½ to 4½ years in prison, when he appeared in a Queens courtroom in a wheelchair on Thursday afternoon.

He may not have expected to find his victim in the courtroom. “I want to speak,” she told the judge, “because the truth is that he really affected my life and messed with it in every aspect possible. My marriage, my papers — I don’t have a job, my papers expired. And I am very happy he received such a sentence, because he affected my life immensely.”

Mr. Baichu was hit by a city bus in April 2009, and his lawyer asked that the judge delay his sentencing so he could continue medical treatment. But Justice James P. Griffin of State Supreme Court was not swayed. “State corrections has excellent doctors who could treat him,” he said as he sent Mr. Baichu to prison, according to a transcript.

“I am particularly offended by the nature of this offense,” the judge added. “A government officer preying, using his position to prey on people who are trying to do the right thing when they apply for citizenship. And the victim here was not trying to beat the system. She was trying to do what she was supposed to do, and she suffered as a result.”