In court, Michael Mineo told the story of his troubled young life, reciting the wrongs he had committed against others, and those he said had been visited upon him.

But Mr. Mineo, 25, insisted that he was telling the truth when he spoke about what police officers did to him in a Brooklyn subway station on Oct. 15, 2008. That day, he testified, after he was caught smoking marijuana and ran, an officer who arrested him shoved something “hard” between his buttocks  once, twice, three times, and then a fourth, this time into his rectum.

“I felt it penetrating me,” he said. “Something I have never felt before.”

Another officer told him, “You liked it,” using a homophobic slur, Mr. Mineo said. As they led him from the station in handcuffs, Mr. Mineo said, he implored the people he passed to help him. Then, Mr. Mineo said, he was let go with a summons and a warning from an officer not to visit a hospital or a police station.

“We have your address,” Mr. Mineo said the officer told him. “We’ll find you and put a felony on you.”